File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2390,6 +2390,19 @@ def test_tunnel_debuglog(self):
2390
2390
lines = output .getvalue ().splitlines ()
2391
2391
self .assertIn ('header: {}' .format (expected_header ), lines )
2392
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
+
2393
2406
2394
2407
if __name__ == '__main__' :
2395
2408
unittest .main (verbosity = 2 )
You can’t perform that action at this time.
0 commit comments