From de4e0c7346a13f510a55053d66c8f1f116881838 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 1 Apr 2011 12:09:11 +0000 Subject: [PATCH] minor update related to the problem with request files reported by jorge_a_santos@hotmail.com --- lib/core/option.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index d863f46c0..a56178ea9 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -27,6 +27,7 @@ from extra.xmlobject import xmlobject from lib.controller.checks import checkConnection from lib.core.common import Backend from lib.core.common import extractRegexResult +from lib.core.common import filterStringValue from lib.core.common import getConsoleWidth from lib.core.common import getFileItems from lib.core.common import getFileType @@ -249,11 +250,13 @@ def __feedTargetsDict(reqFile, addedTargetUrls): if key.lower() == "cookie": cookie = value elif key.lower() == "host": + if '://' in value: + scheme, value = value.split('://')[:2] splitValue = value.split(":") host = splitValue[0] if len(splitValue) > 1: - port = splitValue[1] + port = filterStringValue(splitValue[1], '[0-9]') if not scheme and port == "443": scheme = "https" @@ -262,7 +265,6 @@ def __feedTargetsDict(reqFile, addedTargetUrls): # conf.httpHeaders and consider the following lines as # POSTed data if key == "Content-Length": - data = "" params = True # Avoid proxy and connection type related headers