diff options
author | Georg Brandl <georg@python.org> | 2006-03-28 19:19:56 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2006-03-28 19:19:56 (GMT) |
commit | 80bb2bb7eb8ed68609f7533eac6d1e31f45b2843 (patch) | |
tree | 132d108da6515fbc1357ed83efb33179ab5023ab /Lib/urllib.py | |
parent | d34fa52a064c076afeeb3b1f775e7b333fb3b892 (diff) | |
download | cpython-80bb2bb7eb8ed68609f7533eac6d1e31f45b2843.zip cpython-80bb2bb7eb8ed68609f7533eac6d1e31f45b2843.tar.gz cpython-80bb2bb7eb8ed68609f7533eac6d1e31f45b2843.tar.bz2 |
Revert r43399.
Diffstat (limited to 'Lib/urllib.py')
-rw-r--r-- | Lib/urllib.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index d4573c6..d1c50f6 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -118,7 +118,7 @@ class URLopener: self.proxies = proxies self.key_file = x509.get('key_file') self.cert_file = x509.get('cert_file') - self.addheaders = [('User-Agent', self.version)] + self.addheaders = [('User-agent', self.version)] self.__tempfiles = [] self.__unlink = os.unlink # See cleanup() self.tempcache = None @@ -314,8 +314,8 @@ class URLopener: h = httplib.HTTP(host) if data is not None: h.putrequest('POST', selector) - h.putheader('Content-Type', 'application/x-www-form-urlencoded') - h.putheader('Content-Length', '%d' % len(data)) + h.putheader('Content-type', 'application/x-www-form-urlencoded') + h.putheader('Content-length', '%d' % len(data)) else: h.putrequest('GET', selector) if proxy_auth: h.putheader('Proxy-Authorization', 'Basic %s' % proxy_auth) @@ -400,9 +400,9 @@ class URLopener: cert_file=self.cert_file) if data is not None: h.putrequest('POST', selector) - h.putheader('Content-Type', + h.putheader('Content-type', 'application/x-www-form-urlencoded') - h.putheader('Content-Length', '%d' % len(data)) + h.putheader('Content-length', '%d' % len(data)) else: h.putrequest('GET', selector) if proxy_auth: h.putheader('Proxy-Authorization: Basic %s' % proxy_auth) @@ -584,7 +584,7 @@ class URLopener: data = base64.decodestring(data) else: data = unquote(data) - msg.append('Content-Length: %d' % len(data)) + msg.append('Content-length: %d' % len(data)) msg.append('') msg.append(data) msg = '\n'.join(msg) |