mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-13 17:43:20 +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 httplib import _CS_REQ_STARTED, _CS_REQ_SENT, _CS_IDLE, CannotSendHeader
|
||||||
|
|
||||||
|
from lib.core.common import unicodeToSafeHTMLValue
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
import urllib2
|
import urllib2
|
||||||
import httplib
|
import httplib
|
||||||
|
@ -323,6 +325,9 @@ class HTTPConnection(httplib.HTTPConnection):
|
||||||
else:
|
else:
|
||||||
raise CannotSendHeader()
|
raise CannotSendHeader()
|
||||||
|
|
||||||
|
for header in self._headers:
|
||||||
|
self._headers[header] = unicodeToSafeHTMLValue(self._headers[header])
|
||||||
|
|
||||||
for header in ['Host', 'Accept-Encoding']:
|
for header in ['Host', 'Accept-Encoding']:
|
||||||
if header in self._headers:
|
if header in self._headers:
|
||||||
str = '%s: %s' % (header, self._headers[header])
|
str = '%s: %s' % (header, self._headers[header])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user