added that "default" "Connection: keep-alive" header

This commit is contained in:
Miroslav Stampar 2010-10-17 06:44:54 +00:00
parent cd0fe8dde0
commit 73ececd903

View File

@ -128,6 +128,9 @@ class HTTPHandler(urllib2.HTTPHandler):
else:
h.putrequest('GET', req.get_selector())
if not req.headers.has_key('Connection'):
h.putheader('Connection', 'keep-alive')
for args in self.parent.addheaders:
h.putheader(*args)
for k, v in req.headers.items():