better way to handle that last commit problem

This commit is contained in:
Miroslav Stampar 2010-05-04 08:36:35 +00:00
parent 5bc07426e0
commit af701cdaa2

View File

@ -201,12 +201,14 @@ class Connect:
else:
try:
page = e.read()
responseHeaders = e.info()
except socket.timeout:
warnMsg = "connection timed out to the target url"
raise sqlmapConnectionException, warnMsg
warnMsg = "connection timed out while trying "
warnMsg += "to get error page information"
logger.warn(warnMsg)
page, responseHeaders = None, None
code = e.code
status = e.msg
responseHeaders = e.info()
debugMsg = "got HTTP error code: %d" % code
logger.debug(debugMsg)