fix for a bug reported by cclements@flatearth.​net (TypeError: argument of type 'NoneType' is not iterable)

This commit is contained in:
Miroslav Stampar 2011-06-07 21:46:49 +00:00
parent e7e23d1b79
commit 75c12c5edb
2 changed files with 8 additions and 4 deletions

View File

@ -63,6 +63,9 @@ Pierre Chifflier <pollux@debian.org> and Mark Hymers <ftpmaster@debian.org>
for uploading and accepting the sqlmap Debian package to the official
Debian project repository
Chris Clements <cclements@flatearth.net>
for reporting a minor bug
Andreas Constantinides <megahz@megahz.org>
for reporting a minor bug

View File

@ -576,6 +576,7 @@ class Connect:
_, headers = Connect.getPage(url=uri, get=get, post=post, cookie=cookie, ua=ua, referer=referer, silent=silent, method=method, auxHeaders=auxHeaders, raise404=raise404)
if headers:
if kb.nullConnection == NULLCONNECTION.HEAD and HTTPHEADER.CONTENT_LENGTH in headers:
pageLength = int(headers[HTTPHEADER.CONTENT_LENGTH])
elif kb.nullConnection == NULLCONNECTION.RANGE and HTTPHEADER.CONTENT_RANGE in headers: