Closed GoogleCodeExporter closed 8 years ago
This issue affected us as well. We're working around it by manually closing each
connection in http.connections after every request, but we're not 100% certain
this
is the right fux (it seems to work though). Here's our idiom:
headers, body = http.request(url)
# Workaround for http://code.google.com/p/httplib2/issues/detail?id=41
[c.close() for c in http.connections.values()]
Original comment by simon%si...@gtempaccount.com
on 1 Sep 2009 at 3:50
Mailing list thread:
http://groups.google.com/group/httplib2-dev/browse_thread/thread/55cafd03850d895
Original comment by simon%si...@gtempaccount.com
on 1 Sep 2009 at 3:50
If you want a connection to be closed after the response is returned
then add a "Connection: close" header to the request:
uri = "http://www.google.com/"
(response, content) = self.http.request(uri, "GET", headers={"connection": "close"})
Original comment by joe.gregorio@gmail.com
on 1 Sep 2009 at 5:00
Original issue reported on code.google.com by
l.m.orch...@gmail.com
on 2 Nov 2008 at 4:33Attachments: