-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Routing] Allow GET requests to be redirected. Fixes #23004 #23009
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
[Routing] Allow GET requests to be redirected. Fixes #23004 #23009
Conversation
In the current implementation I saw that redirects behaviour is still rather naive. For example, when a route is registered with with POST and GET as available methods and there's a trailing slash the dumped matcher will try to redirect it, which I think it shouldn't. We have a number of options to resolve this:
|
By "current implementation", do you mean 3.2 and before? It looks like this PR fixes the behavior change from 3.2 to 3.3 (correct?). Should we discuss the proper/better behavior on a different issue to keep this one moving? Thanks for the fast PR btw! |
@weaverryan ah yeah sorry about this, should have been more specific. But yeah, it's also 3.2 and before. I'll open a new issue for the redirect behaviour. |
@weaverryan We were upgrading from 3.2.9 to 3.3.0 and also we have another project running on 3.2.8 which is also redirecting. |
I think this was a side-effect of introducing the canonical method btw. There was some not super well defined handling going on there. With the PR it was (accidentally) made clearer, but this one seemed to have slipped through. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Thank you @frankdejonge. |
…(frankdejonge) This PR was merged into the 3.3 branch. Discussion ---------- [Routing] Allow GET requests to be redirected. Fixes #23004 | Q | A | ------------- | --- | Branch? | 3.3 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #23004 | License | MIT | Doc PR | NA GET requests didn't get the same redirect treatment as HEAD requests. I've also added tests cases for all the different trailing/non-trailing slash situations. Commits ------- 71d4e36 [Routing] Allow GET requests to be redirected. Fixes #23004
GET requests didn't get the same redirect treatment as HEAD requests. I've also added tests cases for all the different trailing/non-trailing slash situations.