File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed
Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -926,6 +926,8 @@ async def _connect_and_send_request(
926926 if url .origin () != redirect_origin :
927927 auth = None
928928 headers .pop (hdrs .AUTHORIZATION , None )
929+ headers .pop (hdrs .COOKIE , None )
930+ headers .pop (hdrs .PROXY_AUTHORIZATION , None )
929931
930932 url = parsed_redirect_url
931933 params = {}
Original file line number Diff line number Diff line change @@ -3458,6 +3458,8 @@ async def srv_from(request):
34583458 async def srv_to (request ):
34593459 assert request .host == url_to .host
34603460 assert "Authorization" not in request .headers , "Header wasn't dropped"
3461+ assert "Proxy-Authorization" not in request .headers
3462+ assert "Cookie" not in request .headers
34613463 return web .Response ()
34623464
34633465 server_from = await create_server_for_url_and_handler (url_from , srv_from )
@@ -3500,11 +3502,16 @@ async def close(self):
35003502 resp = await client .get (
35013503 url_from ,
35023504 auth = aiohttp .BasicAuth ("user" , "pass" ),
3505+ headers = {"Proxy-Authorization" : "Basic dXNlcjpwYXNz" , "Cookie" : "a=b" },
35033506 )
35043507 assert resp .status == 200
35053508 resp = await client .get (
35063509 url_from ,
3507- headers = {"Authorization" : "Basic dXNlcjpwYXNz" },
3510+ headers = {
3511+ "Authorization" : "Basic dXNlcjpwYXNz" ,
3512+ "Proxy-Authorization" : "Basic dXNlcjpwYXNz" ,
3513+ "Cookie" : "a=b" ,
3514+ },
35083515 )
35093516 assert resp .status == 200
35103517
You can’t perform that action at this time.
0 commit comments