summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-07-26 07:40:17 (GMT)
committerGeorg Brandl <georg@python.org>2006-07-26 07:40:17 (GMT)
commit0619a329e822641dff088d9141a7885da882369c (patch)
treeb1d67741ba758d9bcea1080b042a9c01a5eaeda7 /Lib/test/test_urllib2.py
parentcf0c1729dc29fdc422f817760b8f76978fb0fa39 (diff)
downloadcpython-0619a329e822641dff088d9141a7885da882369c.zip
cpython-0619a329e822641dff088d9141a7885da882369c.tar.gz
cpython-0619a329e822641dff088d9141a7885da882369c.tar.bz2
Bug #1459963: properly capitalize HTTP header names.
Diffstat (limited to 'Lib/test/test_urllib2.py')
-rw-r--r--Lib/test/test_urllib2.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index 034b9d0..67218b8 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -676,11 +676,11 @@ class HandlerTests(unittest.TestCase):
r = MockResponse(200, "OK", {}, "")
newreq = h.do_request_(req)
if data is None: # GET
- self.assert_("Content-length" not in req.unredirected_hdrs)
- self.assert_("Content-type" not in req.unredirected_hdrs)
+ self.assert_("Content-Length" not in req.unredirected_hdrs)
+ self.assert_("Content-Type" not in req.unredirected_hdrs)
else: # POST
- self.assertEqual(req.unredirected_hdrs["Content-length"], "0")
- self.assertEqual(req.unredirected_hdrs["Content-type"],
+ self.assertEqual(req.unredirected_hdrs["Content-Length"], "0")
+ self.assertEqual(req.unredirected_hdrs["Content-Type"],
"application/x-www-form-urlencoded")
# XXX the details of Host could be better tested
self.assertEqual(req.unredirected_hdrs["Host"], "example.com")
@@ -692,8 +692,8 @@ class HandlerTests(unittest.TestCase):
req.add_unredirected_header("Host", "baz")
req.add_unredirected_header("Spam", "foo")
newreq = h.do_request_(req)
- self.assertEqual(req.unredirected_hdrs["Content-length"], "foo")
- self.assertEqual(req.unredirected_hdrs["Content-type"], "bar")
+ self.assertEqual(req.unredirected_hdrs["Content-Length"], "foo")
+ self.assertEqual(req.unredirected_hdrs["Content-Type"], "bar")
self.assertEqual(req.unredirected_hdrs["Host"], "baz")
self.assertEqual(req.unredirected_hdrs["Spam"], "foo")
@@ -847,7 +847,7 @@ class HandlerTests(unittest.TestCase):
407, 'Proxy-Authenticate: Basic realm="%s"\r\n\r\n' % realm)
opener.add_handler(auth_handler)
opener.add_handler(http_handler)
- self._test_basic_auth(opener, auth_handler, "Proxy-authorization",
+ self._test_basic_auth(opener, auth_handler, "Proxy-Authorization",
realm, http_handler, password_manager,
"http://acme.example.com:3128/protected",
"proxy.example.com:3128",