From fb9f669544d80635917f1f638af4035dbfb59e96 Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Tue, 29 Jun 2010 21:10:33 +0000 Subject: [PATCH] More verbose comments --- lib/core/option.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/core/option.py b/lib/core/option.py index fb4344314..dbd106dae 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -167,19 +167,24 @@ def __feedTargetsDict(reqFile, addedTargetUrls): elif "?" in line and "=" in line and ": " not in line: params = True - # Cookie and Host headers + # Headers elif ": " in line: key, value = line.split(": ", 1) + # Cookie and Host headers if key.lower() == "cookie": cookie = value elif key.lower() == "host": 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": data = "" params = True + # Avoid proxy and connection type related headers elif key not in ( "Proxy-Connection", "Connection" ): conf.httpHeaders.append((str(key), str(value)))