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 @@ -893,6 +893,8 @@ async def _connect_and_send_request(
893893 if url .origin () != redirect_origin :
894894 auth = None
895895 headers .pop (hdrs .AUTHORIZATION , None )
896+ headers .pop (hdrs .COOKIE , None )
897+ headers .pop (hdrs .PROXY_AUTHORIZATION , None )
896898
897899 url = parsed_redirect_url
898900 params = {}
Original file line number Diff line number Diff line change @@ -3445,6 +3445,8 @@ async def srv_from(request):
34453445 async def srv_to (request ):
34463446 assert request .host == url_to .host
34473447 assert "Authorization" not in request .headers , "Header wasn't dropped"
3448+ assert "Proxy-Authorization" not in request .headers
3449+ assert "Cookie" not in request .headers
34483450 return web .Response ()
34493451
34503452 server_from = await create_server_for_url_and_handler (url_from , srv_from )
@@ -3487,11 +3489,16 @@ async def close(self):
34873489 resp = await client .get (
34883490 url_from ,
34893491 auth = aiohttp .BasicAuth ("user" , "pass" ),
3492+ headers = {"Proxy-Authorization" : "Basic dXNlcjpwYXNz" , "Cookie" : "a=b" },
34903493 )
34913494 assert resp .status == 200
34923495 resp = await client .get (
34933496 url_from ,
3494- headers = {"Authorization" : "Basic dXNlcjpwYXNz" },
3497+ headers = {
3498+ "Authorization" : "Basic dXNlcjpwYXNz" ,
3499+ "Proxy-Authorization" : "Basic dXNlcjpwYXNz" ,
3500+ "Cookie" : "a=b" ,
3501+ },
34953502 )
34963503 assert resp .status == 200
34973504
You can’t perform that action at this time.
0 commit comments