From 5c099efccce7434d8672279117134c5fe0565c39 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 18 Feb 2013 11:38:01 +0100 Subject: [PATCH] Fix for an Issue #401 --- lib/controller/checks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/controller/checks.py b/lib/controller/checks.py index 06e79e0ab..c3855842e 100644 --- a/lib/controller/checks.py +++ b/lib/controller/checks.py @@ -1051,7 +1051,7 @@ def checkNullConnection(): try: page, headers, _ = Request.getPage(method=HTTPMETHOD.HEAD) - if not page and HTTPHEADER.CONTENT_LENGTH in headers: + if not page and HTTPHEADER.CONTENT_LENGTH in (headers or {}): kb.nullConnection = NULLCONNECTION.HEAD infoMsg = "NULL connection is supported with HEAD header" @@ -1059,7 +1059,7 @@ def checkNullConnection(): else: page, headers, _ = Request.getPage(auxHeaders={HTTPHEADER.RANGE: "bytes=-1"}) - if page and len(page) == 1 and HTTPHEADER.CONTENT_RANGE in headers: + if page and len(page) == 1 and HTTPHEADER.CONTENT_RANGE in (headers or {}): kb.nullConnection = NULLCONNECTION.RANGE infoMsg = "NULL connection is supported with GET header "