mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
major bug fix for --keep-alive option in multithreading mode (that 'shitty' _headers = {} made a one shared object for all connection objects)
This commit is contained in:
parent
36ef8ca575
commit
dc50543ea4
|
@ -295,10 +295,10 @@ class HTTPResponse(httplib.HTTPResponse):
|
|||
class HTTPConnection(httplib.HTTPConnection):
|
||||
# use the modified response class
|
||||
response_class = HTTPResponse
|
||||
_headers = {}
|
||||
_headers = None
|
||||
|
||||
def clearheaders(self):
|
||||
self._headers.clear()
|
||||
self._headers = {}
|
||||
|
||||
def putheader(self, header, value):
|
||||
"""Send a request header line to the server.
|
||||
|
|
|
@ -347,10 +347,7 @@ class Connect:
|
|||
if kb.nullConnection == "HEAD":
|
||||
pageLength = int(headers['Content-Length'])
|
||||
elif kb.nullConnection == "Range":
|
||||
if 'Content-Range' in headers:
|
||||
pageLength = int(headers['Content-Range'][headers['Content-Range'].find('/') + 1:])
|
||||
elif 'content-length' in headers: #sometimes
|
||||
pageLength = int(headers['content-length'])
|
||||
pageLength = int(headers['Content-Range'][headers['Content-Range'].find('/') + 1:])
|
||||
|
||||
if not pageLength:
|
||||
page, headers = Connect.getPage(url=uri, get=get, post=post, cookie=cookie, ua=ua, silent=silent, method=method, auxHeaders=auxHeaders, response=response, raise404=raise404)
|
||||
|
|
Loading…
Reference in New Issue
Block a user