mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 21:21:33 +00:00
Minor exception adjustment
This commit is contained in:
@@ -120,8 +120,7 @@ class HTTPHandler(urllib2.HTTPHandler):
|
|||||||
data = req.get_data()
|
data = req.get_data()
|
||||||
h.putrequest('POST', req.get_selector())
|
h.putrequest('POST', req.get_selector())
|
||||||
if not req.headers.has_key('Content-type'):
|
if not req.headers.has_key('Content-type'):
|
||||||
h.putheader('Content-type',
|
h.putheader('Content-type', 'application/x-www-form-urlencoded')
|
||||||
'application/x-www-form-urlencoded')
|
|
||||||
if not req.headers.has_key('Content-length'):
|
if not req.headers.has_key('Content-length'):
|
||||||
h.putheader('Content-length', '%d' % len(data))
|
h.putheader('Content-length', '%d' % len(data))
|
||||||
else:
|
else:
|
||||||
@@ -134,9 +133,9 @@ class HTTPHandler(urllib2.HTTPHandler):
|
|||||||
h.endheaders()
|
h.endheaders()
|
||||||
if req.has_data():
|
if req.has_data():
|
||||||
h.send(data)
|
h.send(data)
|
||||||
except:
|
except socket.error, err:
|
||||||
h.close()
|
h.close()
|
||||||
raise
|
raise urllib2.URLError(err)
|
||||||
|
|
||||||
def do_open(self, http_class, req):
|
def do_open(self, http_class, req):
|
||||||
host = req.get_host()
|
host = req.get_host()
|
||||||
|
|||||||
Reference in New Issue
Block a user