Ensure that header updates are done case-insensitively.
(self, httpbin)
| 1601 | assert r.status_code == 200 |
| 1602 | |
| 1603 | def test_fixes_1329(self, httpbin): |
| 1604 | """Ensure that header updates are done case-insensitively.""" |
| 1605 | s = requests.Session() |
| 1606 | s.headers.update({"ACCEPT": "BOGUS"}) |
| 1607 | s.headers.update({"accept": "application/json"}) |
| 1608 | r = s.get(httpbin("get")) |
| 1609 | headers = r.request.headers |
| 1610 | assert headers["accept"] == "application/json" |
| 1611 | assert headers["Accept"] == "application/json" |
| 1612 | assert headers["ACCEPT"] == "application/json" |
| 1613 | |
| 1614 | def test_uppercase_scheme_redirect(self, httpbin): |
| 1615 | parts = urlparse(httpbin("html")) |