You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Arguably the RFCs are in Requests' favor. It's safer to leave those quotes because they should be quoted by RFC 3986 and even the What WG URL spec suggests they should be. Not all servers are going to reject aiohttp's behavior but some will. It's safer to be conservative in what is sent (quote reserved characters, etc.) then it is not to.
Indeed, we found this discrepancy between requests and aiohttp when we got a 403 error from our server at Hugging Face in streaming mode (that uses aiohttp) and no error in non-streaming mode (that uses requests)
When requoting a redirection URL, the single quotation mark does not get unquoted:
%27
=>%27
:However, the
aiohttp
library usesyarl.ULR
and this does unquote%27
:%27
=>'
Expected Result
I think both libraries should have the same behavior.
Actual Result
The
requests
library does not unquote%27
, whereas theaiohttp
library (that usesyarl
) does unquote%27
.Reproduction Steps
System Information
The text was updated successfully, but these errors were encountered: