curl-and-python

Re: PyCurl READFUNCTION - set number of characters to read

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 23 Oct 2013 12:16:40 +0200 (CEST)

On Tue, 22 Oct 2013, Dima Tisnek wrote:

> My guess is, pycurl allocates some buffer and thus you need to return exact
> size from python world.

That's probably because it is only a thin layer ontop of libcurl's
functionality.

libcurl has <n> number of bytes in its buffer to fill with data from the user
and if the user has more data to feed, it needs to feed them in the _next_
read callback.

--
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2013-10-23