just in case update

This commit is contained in:
Miroslav Stampar 2010-10-15 11:20:19 +00:00
parent 5f6d88a418
commit dcb9c2103a

View File

@ -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) _, 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']) 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:]) pageLength = int(headers['Content-Range'][headers['Content-Range'].find('/') + 1:])
if not pageLength: if not pageLength: