← index #931PR #942
Related · high · value 2.916
QUERY · ISSUE

"requests" does not handle redirection with relative path correctly

openby pluto0x0opened 2024-10-20updated 2024-10-20

In python-ecosys/requests/requests/init.py:183,

The url redirect can be a relative path, which cause the missing of hostname and protocal at redirecting.

CANDIDATE · PULL REQUEST

python-ecosys/requests/requests/__init__.py: Use the host in the redirect url, not the one in headers.

closedby codemeeopened 2024-12-06updated 2025-04-12

removing the host header when redirect

The host in headers extracted from the original url may not be the same as the host in the redirect url. It shoud use the host in the redirect url, not the one in the headers.

1 comment
dpgeorge · 2025-04-12

Rebased and merged in 43ad7c58fd5fc247c255dacb37ab815ec212ee71

Keyboard

j / / n
next pair
k / / p
previous pair
1 / / h
show query pane
2 / / l
show candidate pane
c
copy suggested comment
r
toggle reasoning
g i
go to index
?
show this help
esc
close overlays

press ? or esc to close

copied