This commit is contained in:
Miroslav Stampar
2016-03-06 20:04:45 +01:00
parent 0f6e529fb9
commit 06296bd251
2 changed files with 3 additions and 2 deletions

View File

@@ -391,9 +391,10 @@ class Connect(object):
for key, value in headers.items():
del headers[key]
headers[unicodeencode(key, kb.pageEncoding)] = unicodeencode(value, kb.pageEncoding)
value = unicodeencode(value, kb.pageEncoding)
for char in (r"\r", r"\n"):
value = re.sub(r"(%s)([^ \t])" % char, r"\g<1>\t\g<2>", value)
headers[unicodeencode(key, kb.pageEncoding)] = value.strip("\r\n")
url = unicodeencode(url)
post = unicodeencode(post)