I'm using pycurl to upload a file via put and python cgi script to receive the file on the server side. Essentially, the code on the server side is:
while True:
next = sys.stdin.read(4096)
if not next:
break
#.... write the buffer
This seems to work with text, but not binary files (I'm on windows). With binary files, the loop doing stdin.read breaks after receiving anything around 10kb to 100kb. Any ideas?