-
Notifications
You must be signed in to change notification settings - Fork 9.3k
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
You cannot set a 303 redirect response using a result factory #9028
Comments
Why need this? Please describe a complete use case. |
Why do we need a 303 status code? Surely that question answers itself. Use case:
|
This is not a use case. For which purpose do you need such a status code? There are a lot of codes with some |
What you are asking is "why do you want to set a 303 response code?" which falls outside the remit of discussion in my opinion. Magento should be flexible enough to allow a custom response code, especially when the public API ( If you must know the use case, I am using XHR to send a PUT request, and then I want to send a 303 response code so it follows the redirect using GET instead. |
Thanks for your input,
That was exactly what I was asking for.
Any additional flexibility means more maintenance efforts. But of course ANY limitation/unimplemented feature should be reasonable. |
After getting familiar with implementation it looks like https://github.com/magento/magento2/blob/develop/lib/internal/Magento/Framework/Controller/ResultInterface.php#L13 is promising what you expect :) In
but then suddenly rewritten in
Fix seems to be as simple as
Anybody want to create a PR? |
@jameshalsall, thank you for your report. |
I'm working on it #SQUASHTOBERFEST |
Internal ticket to track issue progress: MAGETWO-81973 |
The issue has been fixed in 2.2-develop branch and will be available with 2.2.2 release |
Hi @jameshalsall. Thank you for your report. The fix will be available with the upcoming patch release. |
Preconditions
Steps to reproduce
Expected result
Actual result
Example code (use in any controller extending the default
Action
):The text was updated successfully, but these errors were encountered: