mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
bug fix for that BadStatusLine (http://bugs.python.org/issue8450)
This commit is contained in:
parent
6295a59a30
commit
ef1809464d
|
@ -160,6 +160,7 @@ class HTTPHandler(urllib2.HTTPHandler):
|
||||||
else:
|
else:
|
||||||
try: r = h.getresponse()
|
try: r = h.getresponse()
|
||||||
except httplib.ResponseNotReady, e: r = None
|
except httplib.ResponseNotReady, e: r = None
|
||||||
|
except httplib.BadStatusLine, e: r = None
|
||||||
|
|
||||||
if r is None or r.version == 9:
|
if r is None or r.version == 9:
|
||||||
# httplib falls back to assuming HTTP 0.9 if it gets a
|
# httplib falls back to assuming HTTP 0.9 if it gets a
|
||||||
|
|
|
@ -243,9 +243,6 @@ class Connect:
|
||||||
elif "timeout" in tbMsg:
|
elif "timeout" in tbMsg:
|
||||||
warnMsg = "connection timed out to the target url"
|
warnMsg = "connection timed out to the target url"
|
||||||
elif "BadStatusLine" in tbMsg:
|
elif "BadStatusLine" in tbMsg:
|
||||||
debugMsg = "BadStatusLine: %s || %s || %s" % (tbMsg, e, e.line)
|
|
||||||
logger.debug(debugMsg)
|
|
||||||
|
|
||||||
warnMsg = "the target url responded with an unknown HTTP "
|
warnMsg = "the target url responded with an unknown HTTP "
|
||||||
warnMsg += "status code, try to force the HTTP User-Agent "
|
warnMsg += "status code, try to force the HTTP User-Agent "
|
||||||
warnMsg += "header with option --user-agent or -a"
|
warnMsg += "header with option --user-agent or -a"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user