diff --git a/lib/request/basic.py b/lib/request/basic.py index 40c1b567e..810c946f2 100644 --- a/lib/request/basic.py +++ b/lib/request/basic.py @@ -134,6 +134,8 @@ def decodePage(page, contentEncoding, contentType): if charset: kb.pageEncoding = charset page = getUnicode(page) + else: + page = getUnicode(page) return page diff --git a/lib/request/connect.py b/lib/request/connect.py index d45bef4a6..3278f5bf9 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -271,7 +271,7 @@ class Connect: responseMsg += "[#%d] (%d %s):\n" % (threadData.lastRequestUID, code, status) if responseHeaders: - logHeaders = "\n".join(["%s: %s" % (getUnicode(key.capitalize()) if isinstance(key, basestring) else key, getUnicode(value)) for (key, value) in responseHeaders.items()]) + logHeaders = "\n".join(["%s: %s" % (key.capitalize() if isinstance(key, basestring) else key, getUnicode(value)) for (key, value) in responseHeaders.items()]) logHTTPTraffic(requestMsg, "%s%s\n\n%s" % (responseMsg, logHeaders, page))