Potential patch for an Issue #1093

This commit is contained in:
Miroslav Stampar 2015-01-07 11:40:11 +01:00
parent 30b9f3d556
commit 450b3c93cb

View File

@ -263,10 +263,6 @@ class Connect(object):
# support those by default
url = asciifyUrl(url)
# fix for known issues when using url in unicode format
# (e.g. UnicodeDecodeError: "url = url + '?' + query" in redirect case)
url = unicodeencode(url)
try:
socket.setdefaulttimeout(timeout)
@ -353,6 +349,7 @@ class Connect(object):
del headers[key]
headers[unicodeencode(key, kb.pageEncoding)] = unicodeencode(item, kb.pageEncoding)
url = unicodeencode(url)
post = unicodeencode(post, kb.pageEncoding)
if method and method not in (HTTPMETHOD.GET, HTTPMETHOD.POST):