diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 8ed1e296e..54188a6eb 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -953,6 +953,9 @@ def checkNullConnection(): Reference: http://www.wisec.it/sectou.php?id=472f952d79293 """ + if conf.data: + return False + infoMsg = "testing NULL connection to the target url" logger.info(infoMsg) diff --git a/lib/request/connect.py b/lib/request/connect.py index c5175d9b8..607e650cf 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -242,7 +242,7 @@ class Connect: return page - elif any ((refreshing, crawling)): + elif any((refreshing, crawling)): pass elif target: diff --git a/thirdparty/keepalive/keepalive.py b/thirdparty/keepalive/keepalive.py index 6d35597e0..674391f9a 100644 --- a/thirdparty/keepalive/keepalive.py +++ b/thirdparty/keepalive/keepalive.py @@ -129,7 +129,7 @@ class HTTPHandler(urllib2.HTTPHandler): if not req.headers.has_key('Content-length'): req.headers['Content-length'] = '%d' % len(data) else: - h.putrequest('GET', req.get_selector()) + h.putrequest(req.get_method() or 'GET', req.get_selector()) if not req.headers.has_key('Connection'): req.headers['Connection'] = 'keep-alive'