Fix for an Issue #152

This commit is contained in:
Miroslav Stampar 2012-08-20 10:41:43 +02:00
parent 59078bb1b8
commit 76338add17
3 changed files with 5 additions and 2 deletions

View File

@ -953,6 +953,9 @@ def checkNullConnection():
Reference: http://www.wisec.it/sectou.php?id=472f952d79293 Reference: http://www.wisec.it/sectou.php?id=472f952d79293
""" """
if conf.data:
return False
infoMsg = "testing NULL connection to the target url" infoMsg = "testing NULL connection to the target url"
logger.info(infoMsg) logger.info(infoMsg)

View File

@ -242,7 +242,7 @@ class Connect:
return page return page
elif any ((refreshing, crawling)): elif any((refreshing, crawling)):
pass pass
elif target: elif target:

View File

@ -129,7 +129,7 @@ class HTTPHandler(urllib2.HTTPHandler):
if not req.headers.has_key('Content-length'): if not req.headers.has_key('Content-length'):
req.headers['Content-length'] = '%d' % len(data) req.headers['Content-length'] = '%d' % len(data)
else: else:
h.putrequest('GET', req.get_selector()) h.putrequest(req.get_method() or 'GET', req.get_selector())
if not req.headers.has_key('Connection'): if not req.headers.has_key('Connection'):
req.headers['Connection'] = 'keep-alive' req.headers['Connection'] = 'keep-alive'