mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
fix for a bug reported by malice.anon@gmail.com (UnicodeEncodeError..self.sock.sendall(str))
This commit is contained in:
parent
b98cbeee04
commit
b1c7a17163
|
@ -71,6 +71,8 @@ EXTRA ATTRIBUTES AND METHODS
|
|||
"""
|
||||
from httplib import _CS_REQ_STARTED, _CS_REQ_SENT, _CS_IDLE, CannotSendHeader
|
||||
|
||||
from lib.core.common import unicodeToSafeHTMLValue
|
||||
|
||||
import threading
|
||||
import urllib2
|
||||
import httplib
|
||||
|
@ -323,6 +325,9 @@ class HTTPConnection(httplib.HTTPConnection):
|
|||
else:
|
||||
raise CannotSendHeader()
|
||||
|
||||
for header in self._headers:
|
||||
self._headers[header] = unicodeToSafeHTMLValue(self._headers[header])
|
||||
|
||||
for header in ['Host', 'Accept-Encoding']:
|
||||
if header in self._headers:
|
||||
str = '%s: %s' % (header, self._headers[header])
|
||||
|
|
Loading…
Reference in New Issue
Block a user