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 @@ -2294,6 +2294,19 @@ def test_tunnel_debuglog(self):
2294
2294
lines = output .getvalue ().splitlines ()
2295
2295
self .assertIn ('header: {}' .format (expected_header ), lines )
2296
2296
2297
+ def test_proxy_response_headers (self ):
2298
+ expected_header = ('X-Dummy' , '1' )
2299
+ response_text = 'HTTP/1.0 200 OK\r \n {}: {}\r \n \r \n ' .format (
2300
+ * expected_header
2301
+ )
2302
+
2303
+ self .conn ._create_connection = self ._create_connection (response_text )
2304
+ self .conn .set_tunnel ('destination.com' )
2305
+
2306
+ self .conn .request ('PUT' , '/' , '' )
2307
+ headers = self .conn ._proxy_response_headers
2308
+ self .assertIn (expected_header , headers .items ())
2309
+
2297
2310
2298
2311
if __name__ == '__main__' :
2299
2312
unittest .main (verbosity = 2 )
You can’t perform that action at this time.
0 commit comments