curl-and-python

Re: http persistence in pycurl

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 8 Jul 2011 14:15:52 +0200 (CEST)

On Fri, 8 Jul 2011, Konstantinos Botsaris wrote:

> I just wanted to ask how to implement the http persistence with pycurl. Is
> it done by maintaining a single curl object on which I just change the url
> (on the same server) and calling perform again ?

Eaxctly so.

> Furthermore is there a way to set the timeout option to no timeout for a
> curl object that timeout was set previously in a value in order to maintain
> the same curl object?

The timeout value you set is a maximum time for a request, so a subsequent
request on the same handle will thus use the same timeout value. You can reset
a timeout back to "no timeout" by setting the value to 0.

-- 
  / daniel.haxx.se
_______________________________________________
http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-and-python
Received on 2011-07-08