Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Mar 5, 2018
Merged

[FrameworkBundle] PR #26213 Document redirections with 307/308 HTTP status codes #9298

merged 3 commits into from
Mar 5, 2018

Conversation

ZipoKing
Copy link
Contributor

This documents changes introduced with pull request symfony/symfony#26213

Redirecting POST/PUT calls
--------------------------

As default behaviour of both methods mentioned above results in sending
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a


return $collection;

Switching ``keepRequestMethod`` switch to ``true`` will result in sending
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When keepRequestMethod is set to true with either permanent set to false which will lead to a 307 response or 308 with permanent being true. Theses codes will give information in the HTTP request that the method should be repeated without altering the body.

use Symfony\Component\Routing\Route;

$collection = new RouteCollection();
// ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove this

xsi:schemaLocation="http://symfony.com/schema/routing
http://symfony.com/schema/routing/routing-1.0.xsd">

<!-- ... -->
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove this


# config/routes.yaml

# ...
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can remove this


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
Copy link
Contributor

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
Copy link
Contributor Author

Thank you @Simperfit - all changes applied

@javiereguiluz
Copy link
Member

@ZipoKing thanks for contributing the docs for this nice feature that you also contributed ... and congrats on your first Symfony Docs contribution!

@javiereguiluz javiereguiluz merged commit 9468bf9 into symfony:master Mar 5, 2018
javiereguiluz added a commit that referenced this pull request Mar 5, 2018
…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 codes

This documents changes introduced with pull request symfony/symfony#26213

Commits
-------

9468bf9 Reword and added an example
c8ce65d Changes after @Simperfit  review
b3984d0 [PR #26213 Document redirections with 307/308 HTTP status codes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.