Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 492a410

Browse files
committed
Minor fix
1 parent 15f92c4 commit 492a410

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/request/basic.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def title(self):
9494
kb.mergeCookies = not _ or _[0] in ("y", "Y")
9595

9696
if kb.mergeCookies:
97-
_ = lambda x: re.sub("(?i)%s=[^%s]+" % (cookie.name, conf.cDel or DEFAULT_COOKIE_DELIMITER), "%s=%s" % (cookie.name, cookie.value), x)
97+
_ = lambda x: re.sub("(?i)%s=[^%s]+" % (cookie.name, conf.cDel or DEFAULT_COOKIE_DELIMITER), "%s=%s" % (cookie.name, getUnicode(cookie.value)), x)
9898
headers[HTTP_HEADER.COOKIE] = _(headers[HTTP_HEADER.COOKIE])
9999

100100
if PLACE.COOKIE in conf.parameters:
@@ -103,7 +103,7 @@ def title(self):
103103
conf.httpHeaders = [(item[0], item[1] if item[0] != HTTP_HEADER.COOKIE else _(item[1])) for item in conf.httpHeaders]
104104

105105
elif not kb.testMode:
106-
headers[HTTP_HEADER.COOKIE] += "%s %s=%s" % (conf.cDel or DEFAULT_COOKIE_DELIMITER, cookie.name, cookie.value)
106+
headers[HTTP_HEADER.COOKIE] += "%s %s=%s" % (conf.cDel or DEFAULT_COOKIE_DELIMITER, cookie.name, getUnicode(cookie.value))
107107

108108
if kb.testMode:
109109
resetCookieJar(conf.cj)

0 commit comments

Comments
 (0)