-
-
Notifications
You must be signed in to change notification settings - Fork 170
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
Different behaviour between 1.5.1 and 1.6.0 #509
Comments
We just got bitten by this as well. Incoming URLs to aiohttp were double-encoded, and we spent a lot of time troubleshooting the issue. |
Me too! I had an API which accepted JSON as a query parameter, it was failing because it was trying to parse the still encoded string. In other words |
See also aio-libs/aiohttp#4972. |
Related issues in upstream projects: - YARL issue: aio-libs/yarl#509 - aiohttp issue: aio-libs/aiohttp#4972
Related issues in upstream projects: - YARL issue: aio-libs/yarl#509 - aiohttp issue: aio-libs/aiohttp#4972
Related issues in upstream projects: - YARL issue: aio-libs/yarl#509 - aiohttp issue: aio-libs/aiohttp#4972
aiohttp 3.6.3 requires yarl<1.6 |
Hi,
I`m using aiohttp to do both client and server jobs. I have a pre-encoded url
/testapi/NamespaceTable%28PartitionKey%3D%27universal%27%2C%20RowKey%3D%27testdelete%27%29
In aiohttp client, I use URL(url, encoded=True) passed to GET method. And in aiohttp server, there is a handler defined as following:
app.router.add_delete("/testapi/NamespaceTable(PartitionKey='universal', RowKey='testdelete')", delete_namespace_handler)
In yarl 1.5.1, this works fine, request can be handled correctly.
But in my CI/CD pipeline, when I rebuild my project, yarl (which is a dependency of aiohttp) got upgraded to 1.6.0, and this is not working anymore. The aiohttp server keeps reporting "404, not found".
I dig a little deeper, and found that the "_PATH_QUOTER" in _url.py of yarl behaves differently with 1.5.1.
Server will have incoming request with path
/testapi/NamespaceTable%28PartitionKey%3D%27universal%27%2C%20RowKey%3D%27testdelete%27%29
In 1.5.1, _PATH_QUOTER will convert incoming request url to
/testapi/NamespaceTable(PartitionKey='universal',
%20RowKey='testdelete')
In 1.6.0, _PATH_QUOTER will convert the path to
/testapi/NamespaceTable%2528PartitionKey%253D%2527universal%2527%252C%2520RowKey%253D%2527testdelete%2527%2529
The text was updated successfully, but these errors were encountered: