From dcb9c2103a56b3c73f469b4a16d58ca6744c18ea Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 15 Oct 2010 11:20:19 +0000 Subject: [PATCH] just in case update --- lib/request/connect.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/request/connect.py b/lib/request/connect.py index dc669e6fe..101c6e574 100644 --- a/lib/request/connect.py +++ b/lib/request/connect.py @@ -330,9 +330,9 @@ class Connect: _, headers = Connect.getPage(url=uri, get=get, post=post, cookie=cookie, ua=ua, silent=silent, method=method, auxHeaders=auxHeaders, raise404=raise404) - if kb.nullConnection == "HEAD": + if kb.nullConnection == "HEAD" and 'Content-Length' in headers: pageLength = int(headers['Content-Length']) - elif kb.nullConnection == "Range": + elif kb.nullConnection == "Range" and 'Content-Range' in headers: pageLength = int(headers['Content-Range'][headers['Content-Range'].find('/') + 1:]) if not pageLength: