Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

codemee
Copy link

@codemee codemee commented Dec 6, 2024

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.

The host in headers extracted from the original url may not be the same as the host in the redirect url. Poping out the host in headers force the code to use the host in the redirect url, otherwise the redirect may fail due to inconsistence of hosts in the original url and the redirect url.

Signed-off-by: 黃昕暐 <[email protected]>
@codemee codemee changed the title Use the host in the redirect url, not the one in headers. python-ecosys/requests/requests/__init__.py: Use the host in the redirect url, not the one in headers. Dec 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant