diff --git a/lib/request/basic.py b/lib/request/basic.py index 3378fa984..5d0d0ef4f 100644 --- a/lib/request/basic.py +++ b/lib/request/basic.py @@ -154,8 +154,6 @@ def decodePage(page, contentEncoding, contentType): return page def processResponse(page, responseHeaders): - page = getUnicode(page) - parseResponse(page, responseHeaders) if conf.parseErrors: diff --git a/lib/request/connect.py b/lib/request/connect.py index 632f5205e..3a8ee7505 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -285,7 +285,7 @@ class Connect: if responseHeaders: 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)) + logHTTPTraffic(requestMsg, "%s%s\n\n%s" % (responseMsg, logHeaders, page if isinstance(page, unicode) else getUnicode(page))) if conf.verbose <= 5: responseMsg += getUnicode(logHeaders) @@ -358,7 +358,7 @@ class Connect: responseMsg += "[#%d] (%d %s):\n" % (threadData.lastRequestUID, code, status) if responseHeaders: 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)) + logHTTPTraffic(requestMsg, "%s%s\n\n%s" % (responseMsg, logHeaders, page if isinstance(page, unicode) else getUnicode(page))) if conf.verbose <= 5: responseMsg += getUnicode(logHeaders)