-
-
Notifications
You must be signed in to change notification settings - Fork 168
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
Requoting unquotes %27 #1077
Comments
See the reasons argued by the
|
Hi @albertvillanova, you'll get the same result as >>> from yarl import URL
>>> url = "https://netloc/path?param=param%27%27value"
>>> URL(url)
URL('https://netloc/path?param=param''value')
>>> URL(url, encoded=True)
URL('https://netloc/path?param=param%27%27value') When using in session ...
async with session.get(URL(url, encoded = True)) as response:
... |
@bizzyvinci please note that it is your code in However, your default behavior unquotes |
I show the corresponding code lines again: https://github.com/aio-libs/aiohttp/blob/4635161ee8e7ad321cca46e01ce5bfeb1ad8bf26/aiohttp/client.py#L578-L580 |
Would also be fixed by: #1073 (comment) |
Describe the bug
When requoting a redirection URL, you use
yarl.URL
and the single quotation mark gets unquoted:%27
=>'
https://github.com/aio-libs/aiohttp/blob/4635161ee8e7ad321cca46e01ce5bfeb1ad8bf26/aiohttp/client.py#L578-L580
However, the
requests
library does not unquote%27
:%27
=>%27
To Reproduce
Expected behavior
I think both libraries should have the same behavior.
Logs/tracebacks
Python Version
aiohttp Version
multidict Version
yarl Version
OS
Ubuntu Linux
Related component
Client
Additional context
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: