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

aiohttp 3.5.1 munges request url #3494

Closed
khazhyk opened this issue Jan 7, 2019 · 3 comments
Closed

aiohttp 3.5.1 munges request url #3494

khazhyk opened this issue Jan 7, 2019 · 3 comments
Labels

Comments

@khazhyk
Copy link

khazhyk commented Jan 7, 2019

Long story short

aiohttp.get(url) modifies url to something else, resulting in not being able to fetch that URL

import aiohttp
s = aiohttp.ClientSession()
resp = s.get('https://images-ext-2.discordapp.net/external/n945pegasec2-Y2fwHmMso5IqqPmBSKB883Nid5_xMw/%3Fsize%3D1024/https/images.discordapp.net/avatars/86699011792191488/e8b87f5087ab1e4b722dee85f4831204.png')
resp.url # 'https://images-ext-2.discordapp.net/external/n945pegasec2-Y2fwHmMso5IqqPmBSKB883Nid5_xMw/%3Fsize=1024/https/images.discordapp.net/avatars/86699011792191488/e8b87f5087ab1e4b722dee85f4831204.png'

Expected behaviour

It should request the correct url

Actual behaviour

It requests the wrong url (it seems to improperly convert %3D to =, which gives a different and incorrect url)

Steps to reproduce

import aiohttp
s = aiohttp.ClientSession()
resp = s.get('https://images-ext-2.discordapp.net/external/n945pegasec2-Y2fwHmMso5IqqPmBSKB883Nid5_xMw/%3Fsize%3D1024/https/images.discordapp.net/avatars/86699011792191488/e8b87f5087ab1e4b722dee85f4831204.png')
resp.url # 'https://images-ext-2.discordapp.net/external/n945pegasec2-Y2fwHmMso5IqqPmBSKB883Nid5_xMw/%3Fsize=1024/https/images.discordapp.net/avatars/86699011792191488/e8b87f5087ab1e4b722dee85f4831204.png'

Your environment

aiohttp 3.5.1
linux
python 3.6.5

@aio-libs-bot
Copy link

GitMate.io thinks the contributor most likely able to help you is @asvetlov.

Possibly related issues are #660 (aiohttp.request hangs on some URLs), #2920 (AIOHttp failing after some requests), #1290 (aiohttp 1.1), #2829 (aiohttp 3.1 release), and #1403 ([QUESTION] aiohttp.ClientSession.request('GET') issue).

@kxepal
Copy link
Member

kxepal commented Jan 7, 2019

This is duplicate of #3424. Solution could be found in the first comment.

@kxepal kxepal closed this as completed Jan 7, 2019
@lock
Copy link

lock bot commented Jan 7, 2020

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 Jan 7, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Jan 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants