QUERY · ISSUE
"requests" does not handle redirection with relative path correctly
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.
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.
Rebased and merged in 43ad7c58fd5fc247c255dacb37ab815ec212ee71