Skip to content

Commit b0bc314

Browse files
committed
1 parent e7af081 commit b0bc314

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

lib/core/option.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1685,6 +1685,13 @@ def _cleanupOptions():
16851685
threadData = getCurrentThreadData()
16861686
threadData.reset()
16871687

1688+
def _dirtyPatches():
1689+
"""
1690+
Place for "dirty" Python related patches
1691+
"""
1692+
1693+
httplib._MAXLINE = 1 * 1024 * 1024 # to accept overly long result lines (e.g. SQLi results in HTTP header responses)
1694+
16881695
def _purgeOutput():
16891696
"""
16901697
Safely removes (purges) output directory.
@@ -2469,6 +2476,7 @@ def init():
24692476
_saveCmdline()
24702477
_setRequestFromFile()
24712478
_cleanupOptions()
2479+
_dirtyPatches()
24722480
_purgeOutput()
24732481
_checkDependencies()
24742482
_createTemporaryDirectory()

lib/request/connect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -575,7 +575,7 @@ class _(dict):
575575
debugMsg = "got HTTP error code: %d (%s)" % (code, status)
576576
logger.debug(debugMsg)
577577

578-
except (urllib2.URLError, socket.error, socket.timeout, httplib.BadStatusLine, httplib.IncompleteRead, httplib.ResponseNotReady, httplib.UnknownProtocol, struct.error, ProxyError, SqlmapCompressionException, WebSocketException), e:
578+
except (urllib2.URLError, socket.error, socket.timeout, httplib.HTTPException, struct.error, ProxyError, SqlmapCompressionException, WebSocketException), e:
579579
tbMsg = traceback.format_exc()
580580

581581
if "no host given" in tbMsg:

0 commit comments

Comments
 (0)