Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5c099ef

Browse files
author
Miroslav Stampar
committed
Fix for an Issue #401
1 parent 6bacbdb commit 5c099ef

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/controller/checks.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1051,15 +1051,15 @@ def checkNullConnection():
10511051
try:
10521052
page, headers, _ = Request.getPage(method=HTTPMETHOD.HEAD)
10531053

1054-
if not page and HTTPHEADER.CONTENT_LENGTH in headers:
1054+
if not page and HTTPHEADER.CONTENT_LENGTH in (headers or {}):
10551055
kb.nullConnection = NULLCONNECTION.HEAD
10561056

10571057
infoMsg = "NULL connection is supported with HEAD header"
10581058
logger.info(infoMsg)
10591059
else:
10601060
page, headers, _ = Request.getPage(auxHeaders={HTTPHEADER.RANGE: "bytes=-1"})
10611061

1062-
if page and len(page) == 1 and HTTPHEADER.CONTENT_RANGE in headers:
1062+
if page and len(page) == 1 and HTTPHEADER.CONTENT_RANGE in (headers or {}):
10631063
kb.nullConnection = NULLCONNECTION.RANGE
10641064

10651065
infoMsg = "NULL connection is supported with GET header "

0 commit comments

Comments
 (0)