We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d07222 commit 30511e0Copy full SHA for 30511e0
Lib/test/test_httplib.py
@@ -2390,6 +2390,19 @@ def test_tunnel_debuglog(self):
2390
lines = output.getvalue().splitlines()
2391
self.assertIn('header: {}'.format(expected_header), lines)
2392
2393
+ def test_proxy_response_headers(self):
2394
+ expected_header = ('X-Dummy', '1')
2395
+ response_text = 'HTTP/1.0 200 OK\r\n{}: {}\r\n\r\n'.format(
2396
+ *expected_header
2397
+ )
2398
+
2399
+ self.conn._create_connection = self._create_connection(response_text)
2400
+ self.conn.set_tunnel('destination.com')
2401
2402
+ self.conn.request('PUT', '/', '')
2403
+ headers = self.conn._proxy_response_headers
2404
+ self.assertIn(expected_header, headers.items())
2405
2406
2407
if __name__ == '__main__':
2408
unittest.main(verbosity=2)
0 commit comments