From 8426d48e2e9f7badd83142bed157098806e66281 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 14 Apr 2011 10:14:46 +0000 Subject: [PATCH] minor refactoring --- lib/core/option.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index 6b5990192..3782ffd94 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -260,9 +260,6 @@ def __feedTargetsDict(reqFile, addedTargetUrls): if len(splitValue) > 1: port = filterStringValue(splitValue[1], '[0-9]') - if not scheme and port == "443": - scheme = "https" - # Avoid to add a static content length header to # conf.httpHeaders and consider the following lines as # POSTed data @@ -277,8 +274,10 @@ def __feedTargetsDict(reqFile, addedTargetUrls): getPostReq &= re.search(conf.scope, host) is not None if getPostReq and (params or cookie): - if not port and scheme == "https": + if not port and isinstance(scheme, basestring) and scheme.lower() == "https": port = "443" + elif not scheme and port == "443": + scheme = "https" if not url.startswith("http"): url = "%s://%s:%s%s" % (scheme or "http", host, port or "80", url)