summaryrefslogtreecommitdiffstats
path: root/Lib/urllib.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r--Lib/urllib.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py
index 90f7aa0..27ec2c9 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -405,8 +405,8 @@ class URLopener:
h.putheader('Content-Length', '%d' % len(data))
else:
h.putrequest('GET', selector)
- if proxy_auth: h.putheader('Proxy-Authorization: Basic %s' % proxy_auth)
- if auth: h.putheader('Authorization: Basic %s' % auth)
+ if proxy_auth: h.putheader('Proxy-Authorization', 'Basic %s' % proxy_auth)
+ if auth: h.putheader('Authorization', 'Basic %s' % auth)
if realhost: h.putheader('Host', realhost)
for args in self.addheaders: h.putheader(*args)
h.endheaders()