one more update regarding Bug #205

This commit is contained in:
Miroslav Stampar 2010-10-28 23:22:13 +00:00
parent 1f5224f1ac
commit 895efd28a6

View File

@ -150,8 +150,17 @@ class Connect:
conn = urllib2.urlopen(req)
if not req.has_header("Accept-Encoding"):
requestHeaders += "Accept-Encoding: identity\n"
requestHeaders += "\n".join(["%s: %s" % (header, value) for header, value in req.header_items()])
if not req.has_header("Cookie") and cookieStr:
requestHeaders += "\n%s" % cookieStr[:-2]
if not req.has_header("Connection"):
requestHeaders += "\nConnection: close"
requestMsg += "\n%s" % requestHeaders
if post: