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
iri_to_uri has a safe_conversion parameter that returns the URL unchanged if it's only ASCII without spaces. This gets used in redirect and Response.get_wsgi_headers. The reason it exists is because urlunsplit sometimes skips adding // after scheme:. The two examples given were magnet:, which doesn't seem to demonstrate the issue, and itms-services:, which has no public spec and doesn't even appear to be an actively used Apple URL scheme.
If it turns out that this somehow breaks a real use case, I think the best course of action is to make it possible to disable the normalization in Response.get_wsgi_headers. Unfortunately, there's already an autocorrect_location_header attribute that means "make the URL absolute". We could try to think of another name, or figure out a way to repurpose the existing attribute name. Or better yet, get the issue fixed in urlunsplit instead.
Was going to write this as a PR, but accidentally merged instead of pushed the PR, so it's already in c3b26d0.
The text was updated successfully, but these errors were encountered:
iri_to_uri
has asafe_conversion
parameter that returns the URL unchanged if it's only ASCII without spaces. This gets used inredirect
andResponse.get_wsgi_headers
. The reason it exists is becauseurlunsplit
sometimes skips adding//
afterscheme:
. The two examples given weremagnet:
, which doesn't seem to demonstrate the issue, anditms-services:
, which has no public spec and doesn't even appear to be an actively used Apple URL scheme.If it turns out that this somehow breaks a real use case, I think the best course of action is to make it possible to disable the normalization in
Response.get_wsgi_headers
. Unfortunately, there's already anautocorrect_location_header
attribute that means "make the URL absolute". We could try to think of another name, or figure out a way to repurpose the existing attribute name. Or better yet, get the issue fixed inurlunsplit
instead.Was going to write this as a PR, but accidentally merged instead of pushed the PR, so it's already in c3b26d0.
The text was updated successfully, but these errors were encountered: