More verbose comments

This commit is contained in:
Bernardo Damele 2010-06-29 21:10:33 +00:00
parent 8576817a2b
commit fb9f669544

View File

@ -167,19 +167,24 @@ def __feedTargetsDict(reqFile, addedTargetUrls):
elif "?" in line and "=" in line and ": " not in line: elif "?" in line and "=" in line and ": " not in line:
params = True params = True
# Cookie and Host headers # Headers
elif ": " in line: elif ": " in line:
key, value = line.split(": ", 1) key, value = line.split(": ", 1)
# Cookie and Host headers
if key.lower() == "cookie": if key.lower() == "cookie":
cookie = value cookie = value
elif key.lower() == "host": elif key.lower() == "host":
host = value host = value
# Avoid to add a static content length header to
# conf.httpHeaders and consider the following lines as
# POSTed data
if key == "Content-Length": if key == "Content-Length":
data = "" data = ""
params = True params = True
# Avoid proxy and connection type related headers
elif key not in ( "Proxy-Connection", "Connection" ): elif key not in ( "Proxy-Connection", "Connection" ):
conf.httpHeaders.append((str(key), str(value))) conf.httpHeaders.append((str(key), str(value)))