summaryrefslogtreecommitdiffstats
path: root/Lib/urllib2.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/urllib2.py')
-rw-r--r--Lib/urllib2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/urllib2.py b/Lib/urllib2.py
index 80829b9..5ca5452 100644
--- a/Lib/urllib2.py
+++ b/Lib/urllib2.py
@@ -781,7 +781,7 @@ def encode_digest(digest):
class AbstractHTTPHandler(BaseHandler):
def do_open(self, http_class, req):
- host = urlparse.urlparse(req.get_full_url())[1]
+ host = req.get_host()
if not host:
raise URLError('no host given')