Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

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

Sign up
Appearance settings

[FrameworkBundle] Add support to 307/308 HTTP status codes in RedirectController#26213

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

Closed
ZipoKing wants to merge4 commits intosymfony:masterfromZipoKing:master

Conversation

@ZipoKing
Copy link
Contributor

QA
Branch?master
Bug fix?no
New feature?yes
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#26171
LicenseMIT
Doc PR

With this PRRedirectController will allow to create redirections with use of 307/308 HTTP status codes together with 301/302. Related RFC documents:

Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

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

thanks for working on this; see comments

* @throws HttpException In case the route name is empty
*/
publicfunctionredirectAction(Request$request,string$route,bool$permanent =false,$ignoreAttributes =false):Response
publicfunctionredirectAction(Request$request,string$route,bool$permanent =false,$ignoreAttributes =false,bool$keepRequestMethod =false):Response

Choose a reason for hiding this comment

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

for other reviewers: the class is final, so this is not a BC break

{
if ('' ==$route) {
thrownewHttpException($permanent ?410 :404);
thrownewHttpException($permanent ?Response::HTTP_GONE :Response::HTTP_NOT_FOUND);

Choose a reason for hiding this comment

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

we prefer explicit numbers; please revert, and use numbers everywhere in the PR

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

@nicolas-grekas Change reverted

@fabpot
Copy link
Member

Thank you@ZipoKing.

@fabpotfabpot closed thisFeb 19, 2018
fabpot added a commit that referenced this pull requestFeb 19, 2018
…odes in RedirectController (ZipoKing)This PR was squashed before being merged into the 4.1-dev branch (closes#26213).Discussion----------[FrameworkBundle] Add support to 307/308 HTTP status codes in RedirectController| Q             | A| ------------- | ---| Branch?       | master| Bug fix?      | no| New feature?  | yes| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#26171| License       | MIT| Doc PR        |With this PR `RedirectController` will allow to create redirections with use of 307/308 HTTP status codes together with 301/302. Related RFC documents:*https://tools.ietf.org/html/rfc7231*https://tools.ietf.org/html/rfc7538Commits-------64fb5a5 [FrameworkBundle] Add support to 307/308 HTTP status codes in RedirectController
@stof
Copy link
Member

this needs a documentation PR though

@ZipoKing
Copy link
ContributorAuthor

@stof will prepare some docs PR later today

javiereguiluz added a commit to symfony/symfony-docs that referenced this pull requestMar 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 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
@fabpotfabpot mentioned this pull requestMay 7, 2018
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.1

Development

Successfully merging this pull request may close these issues.

5 participants

@ZipoKing@fabpot@stof@nicolas-grekas@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp