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):
22942294 lines = output .getvalue ().splitlines ()
22952295 self .assertIn ('header: {}' .format (expected_header ), lines )
22962296
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+
22972310
22982311if __name__ == '__main__' :
22992312 unittest .main (verbosity = 2 )
You can’t perform that action at this time.
0 commit comments