fix for a bug regarding --cookie and --crawl

This commit is contained in:
Miroslav Stampar 2012-01-30 09:17:22 +00:00
parent 2094c715db
commit 594579bef4
2 changed files with 9 additions and 4 deletions

View File

@ -583,6 +583,9 @@ Zhen Zhou <zhouzhenster@gmail.com>
abc abc <biedimc@gmx.net>
for reporting a minor bug
Abuse 007 <abuse007@gmail.com>
for reporting a bug
Alex m3zero@gmail.com
for reporting a minor bug

View File

@ -44,13 +44,15 @@ def forgeHeaders(items=None):
the HTTP requests
"""
items = items or {}
for _ in items.keys():
if items[_] is None:
del items[_]
headers = dict(conf.httpHeaders)
headers.update(items or {})
for _ in headers.keys():
if headers[_] is None:
del headers[_]
if conf.cj:
if HTTPHEADER.COOKIE in headers:
for cookie in conf.cj: