summaryrefslogtreecommitdiff
path: root/Lib/test/test_urllib2_localnet.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_urllib2_localnet.py')
-rw-r--r--Lib/test/test_urllib2_localnet.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/Lib/test/test_urllib2_localnet.py b/Lib/test/test_urllib2_localnet.py
index 1b2baf2f36..fe2ff81a24 100644
--- a/Lib/test/test_urllib2_localnet.py
+++ b/Lib/test/test_urllib2_localnet.py
@@ -614,6 +614,15 @@ class TestUrlopen(unittest.TestCase):
pass
self.assertEqual(handler.headers_received["Range"], "bytes=20-39")
+ def test_sending_headers_camel(self):
+ handler = self.start_server()
+ req = urllib.request.Request("http://localhost:%s/" % handler.port,
+ headers={"X-SoMe-hEader": "foobar"})
+ with urllib.request.urlopen(req):
+ pass
+ self.assertIn("X-Some-Header", handler.headers_received.keys())
+ self.assertNotIn("X-SoMe-hEader", handler.headers_received.keys())
+
def test_basic(self):
handler = self.start_server()
with urllib.request.urlopen("http://localhost:%s" % handler.port) as open_url: