Added --code switch to match in boolean-based tests against the HTTP response code

This commit is contained in:
Bernardo Damele
2011-08-12 16:48:11 +00:00
parent e34787db99
commit 702ed73a65
9 changed files with 39 additions and 23 deletions

View File

@@ -898,7 +898,7 @@ def checkNullConnection():
logger.info(infoMsg)
try:
page, headers = Request.getPage(method=HTTPMETHOD.HEAD)
page, headers, _ = Request.getPage(method=HTTPMETHOD.HEAD)
if not page and HTTPHEADER.CONTENT_LENGTH in headers:
kb.nullConnection = NULLCONNECTION.HEAD
@@ -906,7 +906,7 @@ def checkNullConnection():
infoMsg = "NULL connection is supported with HEAD header"
logger.info(infoMsg)
else:
page, headers = Request.getPage(auxHeaders={HTTPHEADER.RANGE: "bytes=-1"})
page, headers, _ = Request.getPage(auxHeaders={HTTPHEADER.RANGE: "bytes=-1"})
if page and len(page) == 1 and HTTPHEADER.CONTENT_RANGE in headers:
kb.nullConnection = NULLCONNECTION.RANGE