Skip to content

Conversation

@tobias-urdin
Copy link

When we raise the RequestRedirect exception
we have already computed the new url that
should be redirected to in the exception
(new_url) but we don't pass the the
new path that we used to compute the url.

This causes another layer of redirection
in depending code that needs to urlparse()
the url to get the path we already have
the data for.

This adds new_path to the RequestRedirect
exception and populates it with the path
used when computing new_url.

Fixes: #3000

tobias-urdin and others added 2 commits November 11, 2024 08:59
When we raise the RequestRedirect exception
we have already computed the new url that
should be redirected to in the exception
(new_url) but we don't pass the the
new path that we used to compute the url.

This causes another layer of redirection
in depending code that needs to urlparse()
the url to get the path we already have
the data for.

This adds new_path to the RequestRedirect
exception and populates it with the path
used when computing new_url.

Fixes: pallets#3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expose new path used to compute new url in RequestRedirect

1 participant