Re: help with pycurl/win32 and HTTP PUT

From: Daniel Stenberg <>
Date: Wed, 9 Feb 2005 22:57:15 +0100 (CET)

On Wed, 9 Feb 2005, jason kratz wrote:

(this is not an actual libcurl issue, this is a using-pycurl issue - thus
CC'ing the libcurl mailing list won't add much good)

> def read_callback(self, size):
> line =
> return line

Is this code running on windows? Have you made sure you opened the file in
binary mode if it contains binary data?

If you compare the data that is uploaded to the file you wanted to upload,
what data is missing in the uploaded file? (2976 bytes were missing)

You can also use curl's --trace-ascii option and pycurl's DEBUGFUNCTION option
to get to see exactly what data that is sent "over the wire" and comparing
those two should offer some new clues.

(In libcurl land, the callback must return the size of the data it read, but I
guess that is magic pycurl takes care of for you behind your back.)

      Daniel Stenberg -- --
       Dedicated custom curl help for hire:
Received on 2005-02-09