Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.3k
[FrameworkBundle] PR #26213 Document redirections with 307/308 HTTP status codes#9298
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
routing/redirect_in_config.rst Outdated
| Redirecting POST/PUT calls | ||
| -------------------------- | ||
| As default behaviour of both methods mentioned above results in sending |
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.
As a
routing/redirect_in_config.rst Outdated
| return $collection; | ||
| Switching ``keepRequestMethod`` switch to ``true`` will result in sending |
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.
WhenkeepRequestMethod is set to true with eitherpermanent set to false which will lead to a307 response or308 withpermanent being true. Theses codes will give information in the HTTP request that the method should be repeated without altering the body.
routing/redirect_in_config.rst Outdated
| use Symfony\Component\Routing\Route; | ||
| $collection = new RouteCollection(); | ||
| // ... |
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.
you can remove this
routing/redirect_in_config.rst Outdated
| xsi:schemaLocation="http://symfony.com/schema/routing | ||
| http://symfony.com/schema/routing/routing-1.0.xsd"> | ||
| <!-- ...--> |
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.
you can remove this
routing/redirect_in_config.rst Outdated
| # config/routes.yaml | ||
| # ... |
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.
you can remove this
routing/redirect_in_config.rst Outdated
| As default behaviour of both methods mentioned above results in sending | ||
| response with ``301`` or ``302`` HTTP status codes, the following call will | ||
| be made with use of HTTP request method. But it some scenarios it is |
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.
use of HTTP request method
WDYM ?
But it some scenarios
But in some scenarios it's either expected or required that the following call [...]
ZipoKing commentedFeb 20, 2018
Thank you@Simperfit - all changes applied |
I did some rewords based onhttps://symfony.com/blog/new-in-symfony-4-1-307-and-308-redirections and added a full config example.
javiereguiluz commentedMar 5, 2018
@ZipoKing thanks for contributing the docs for this nice feature that you also contributed ... and congrats on your first Symfony Docs contribution! |
…7/308 HTTP status codes (ZipoKing, javiereguiluz)This PR was merged into the master branch.Discussion----------[FrameworkBundle] PR #26213 Document redirections with 307/308 HTTP status codesThis documents changes introduced with pull requestsymfony/symfony#26213Commits-------9468bf9 Reword and added an examplec8ce65d Changes after@Simperfit reviewb3984d0 [PR #26213 Document redirections with 307/308 HTTP status codes
This documents changes introduced with pull requestsymfony/symfony#26213