curl-and-python

How to reset cURL handle?

From: Vladimir Ch. <cctv.star_at_gmail.com>
Date: Wed, 28 Aug 2013 17:50:16 -0700

I'm using pycurl with CurlMulti interface, so I need a generic way to reset
a handle before reusing it.

Apparently, Curl.reset() doesn't work because of this bug:
http://curl.haxx.se/mail/curlpython-2009-03/0001.html . I'm still getting
the described error in the latest pycurl.

As a workaround, I created a set of options that I use, and before
returning a handle to the pool try to call Curl.unsetopt(). Unfortunately,
it doesn't work either, I'm getting 'unsetopt() is not supported for this
option while unsetting ...'. I'm also getting an error (TypeError, IIRC)
when setting some options to None.

So, what do I do? How do you use CurlMulti at all?

Vladimir

_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2013-08-29