summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorOren Milman <orenmn@gmail.com>2017-09-03 04:51:39 (GMT)
committerSenthil Kumaran <skumaran@gatech.edu>2017-09-03 04:51:39 (GMT)
commit8df44ee8e0fbdb390bd38eb88eb1ee4e2a10d355 (patch)
tree0317a5cfd9b56ffe8dbb001dd90413a5c1d84052 /Lib
parent868710158910fa38e285ce0e6d50026e1d0b2a8c (diff)
downloadcpython-8df44ee8e0fbdb390bd38eb88eb1ee4e2a10d355.zip
cpython-8df44ee8e0fbdb390bd38eb88eb1ee4e2a10d355.tar.gz
cpython-8df44ee8e0fbdb390bd38eb88eb1ee4e2a10d355.tar.bz2
remove a redundant lower in urllib.parse.urlsplit (#3008)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/urllib/parse.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/urllib/parse.py b/Lib/urllib/parse.py
index 01eb549..76086e5 100644
--- a/Lib/urllib/parse.py
+++ b/Lib/urllib/parse.py
@@ -407,7 +407,6 @@ def urlsplit(url, scheme='', allow_fragments=True):
i = url.find(':')
if i > 0:
if url[:i] == 'http': # optimize the common case
- scheme = url[:i].lower()
url = url[i+1:]
if url[:2] == '//':
netloc, url = _splitnetloc(url, 2)
@@ -418,7 +417,7 @@ def urlsplit(url, scheme='', allow_fragments=True):
url, fragment = url.split('#', 1)
if '?' in url:
url, query = url.split('?', 1)
- v = SplitResult(scheme, netloc, url, query, fragment)
+ v = SplitResult('http', netloc, url, query, fragment)
_parse_cache[key] = v
return _coerce_result(v)
for c in url[:i]: