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

Redirects for HEAD requests should use HEAD #1146

Closed
catlee opened this issue Sep 9, 2016 · 2 comments · Fixed by #1147
Closed

Redirects for HEAD requests should use HEAD #1146

catlee opened this issue Sep 9, 2016 · 2 comments · Fixed by #1147

Comments

@catlee
Copy link
Contributor

catlee commented Sep 9, 2016

Long story short

I'm trying to do a HEAD request to a service that returns a 303 redirect. aiohttp then does a full GET on the new location.

Expected behaviour

aiohttp should instead do a HEAD on the new URL.

Actual behaviour

aiohttp does a GET on the new URL

The code responsible is here: https://github.com/KeepSafe/aiohttp/blob/master/aiohttp/client.py#L228
This references this PR from the requests library: https://github.com/kennethreitz/requests/pull/269/files. However, the requests library is preserving the HEAD method for subsequent requests.

@asvetlov
Copy link
Member

asvetlov commented Sep 9, 2016

Makes sense.
Would you provide a fix?

catlee pushed a commit to catlee/aiohttp that referenced this issue Sep 9, 2016
asvetlov pushed a commit that referenced this issue Sep 10, 2016
@lock
Copy link

lock bot commented Oct 29, 2019

This thread has been automatically locked since there has not been
any recent activity after it was closed. Please open a new issue for
related bugs.

If you feel like there's important points made in this discussion,
please include those exceprts into that new issue.

@lock lock bot added the outdated label Oct 29, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Oct 29, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants