mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-06-30 18:03:08 +03:00
patching and patching and patching
This commit is contained in:
parent
d56cc09fb7
commit
0e1bbf6375
|
@ -67,7 +67,7 @@ EXTRA ATTRIBUTES AND METHODS
|
||||||
prefer to see your error codes, then do.
|
prefer to see your error codes, then do.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
from httplib import _CS_REQ_STARTED, _CS_REQ_SENT, CannotSendHeader
|
from httplib import _CS_REQ_STARTED, _CS_REQ_SENT, _CS_IDLE, CannotSendHeader
|
||||||
|
|
||||||
import threading
|
import threading
|
||||||
import urllib2
|
import urllib2
|
||||||
|
@ -126,16 +126,17 @@ class HTTPHandler(urllib2.HTTPHandler):
|
||||||
h.putheader('Content-length', '%d' % len(data))
|
h.putheader('Content-length', '%d' % len(data))
|
||||||
else:
|
else:
|
||||||
h.putrequest('GET', req.get_selector())
|
h.putrequest('GET', req.get_selector())
|
||||||
except socket.error, err:
|
|
||||||
raise urllib2.URLError(err)
|
|
||||||
|
|
||||||
for args in self.parent.addheaders:
|
for args in self.parent.addheaders:
|
||||||
h.putheader(*args)
|
h.putheader(*args)
|
||||||
for k, v in req.headers.items():
|
for k, v in req.headers.items():
|
||||||
h.putheader(k, v)
|
h.putheader(k, v)
|
||||||
h.endheaders()
|
h.endheaders()
|
||||||
if req.has_data():
|
if req.has_data():
|
||||||
h.send(data)
|
h.send(data)
|
||||||
|
except:
|
||||||
|
h.close()
|
||||||
|
raise
|
||||||
|
|
||||||
def do_open(self, http_class, req):
|
def do_open(self, http_class, req):
|
||||||
host = req.get_host()
|
host = req.get_host()
|
||||||
|
|
Loading…
Reference in New Issue
Block a user