mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-04-26 20:03:45 +03:00
update
This commit is contained in:
parent
c23ea4c749
commit
6f03a9ab5c
|
@ -138,6 +138,7 @@ class HTTPHandler(urllib2.HTTPHandler):
|
||||||
raise urllib2.URLError(err)
|
raise urllib2.URLError(err)
|
||||||
|
|
||||||
def do_open(self, http_class, req):
|
def do_open(self, http_class, req):
|
||||||
|
h = None
|
||||||
host = req.get_host()
|
host = req.get_host()
|
||||||
if not host:
|
if not host:
|
||||||
raise urllib2.URLError('no host given')
|
raise urllib2.URLError('no host given')
|
||||||
|
@ -172,6 +173,7 @@ class HTTPHandler(urllib2.HTTPHandler):
|
||||||
self._start_connection(h, req)
|
self._start_connection(h, req)
|
||||||
r = h.getresponse()
|
r = h.getresponse()
|
||||||
except socket.error, err:
|
except socket.error, err:
|
||||||
|
if h: h.close()
|
||||||
raise urllib2.URLError(err)
|
raise urllib2.URLError(err)
|
||||||
|
|
||||||
# if not a persistent connection, don't try to reuse it
|
# if not a persistent connection, don't try to reuse it
|
||||||
|
|
Loading…
Reference in New Issue
Block a user