← index #931PR #751
Related · high · value 2.474
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

requests: Added support for some non-standard URLs

openby PermissionDenied7335opened 2023-10-19updated 2023-10-19

In some cases, servers may return non-standard URLs like https://ecard.v.zzu.edu.cn?tid=xxxx in "Location" line, which could not be properly treated since there are no slashes between hostname and remote path. So I added my code to separate remote path from hostname.

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