mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
some update (if header key is non-unicode comformant)
This commit is contained in:
parent
2bbbc9a41e
commit
63b8156c00
|
@ -325,15 +325,19 @@ class HTTPConnection(httplib.HTTPConnection):
|
|||
else:
|
||||
raise CannotSendHeader()
|
||||
|
||||
for key, item in self._headers.items():
|
||||
del self._headers[key]
|
||||
self._headers[unicodeToSafeHTMLValue(key)] = unicodeToSafeHTMLValue(item)
|
||||
|
||||
for header in ['Host', 'Accept-Encoding']:
|
||||
if header in self._headers:
|
||||
str = '%s: %s' % (header, self._headers[header])
|
||||
self._output(unicodeToSafeHTMLValue(str))
|
||||
self._output(str)
|
||||
del self._headers[header]
|
||||
|
||||
for header, value in self._headers.items():
|
||||
str = '%s: %s' % (header, value)
|
||||
self._output(unicodeToSafeHTMLValue(str))
|
||||
self._output(str)
|
||||
|
||||
self._send_output()
|
||||
|
||||
|
|
|
@ -158,7 +158,8 @@ class Connect:
|
|||
headers[key] = item
|
||||
|
||||
for key, item in headers.items():
|
||||
headers[key] = unicodeToSafeHTMLValue(item)
|
||||
del headers[key]
|
||||
headers[unicodeToSafeHTMLValue(key)] = unicodeToSafeHTMLValue(item)
|
||||
|
||||
post = unicodeToSafeHTMLValue(post)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user