mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-26 11:33:47 +03:00
fix for a bug reported by shaohua pan (UnicodeDecodeError: 'ascii' codec can't decode...)
This commit is contained in:
parent
d288c6d6e3
commit
709a7d156b
|
@ -134,6 +134,8 @@ def decodePage(page, contentEncoding, contentType):
|
||||||
if charset:
|
if charset:
|
||||||
kb.pageEncoding = charset
|
kb.pageEncoding = charset
|
||||||
page = getUnicode(page)
|
page = getUnicode(page)
|
||||||
|
else:
|
||||||
|
page = getUnicode(page)
|
||||||
|
|
||||||
return page
|
return page
|
||||||
|
|
||||||
|
|
|
@ -271,7 +271,7 @@ class Connect:
|
||||||
responseMsg += "[#%d] (%d %s):\n" % (threadData.lastRequestUID, code, status)
|
responseMsg += "[#%d] (%d %s):\n" % (threadData.lastRequestUID, code, status)
|
||||||
|
|
||||||
if responseHeaders:
|
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))
|
logHTTPTraffic(requestMsg, "%s%s\n\n%s" % (responseMsg, logHeaders, page))
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user