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

[HttpKernel] Fix HttpCache validation HTTP method#19651

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

Merged
fabpot merged 1 commit intosymfony:2.7fromtgalopin:http-cache-method
Aug 17, 2016

Conversation

@tgalopin
Copy link
Contributor

@tgalopintgalopin commentedAug 17, 2016
edited
Loading

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

stloyd reacted with thumbs up emoji
@tgalopintgalopin changed the titlebug #19582 [HttpKernel] Fix HttpCache validation HTTP method[HttpKernel] Fix HttpCache validation HTTP methodAug 17, 2016
@dunglas
Copy link
Member

👍

// send no head requests because we want content
$subRequest->setMethod('GET');
if ($request->isMethodSafe() &&$request->getMethod() !=='HEAD') {
$subRequest->setMethod($request->getMethod());
Copy link
Member

Choose a reason for hiding this comment

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

Is this needed. By default, the subrequest is going to have the same method as the main one.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Indeed, I updated this.


// send no head requests because we want content
$subRequest->setMethod('GET');
if (!$request->isMethodSafe() ||$request->getMethod() ==='HEAD') {
Copy link
Member

Choose a reason for hiding this comment

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

I'm pretty sure thatisMethodSafe() here will always return true. If not, we would not lookup anything in the cache in the first place. So, this part of the condition can be removed.

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

Fixed

@fabpot
Copy link
Member

Thank you@tgalopin.

@fabpotfabpot merged commit1a8a8af intosymfony:2.7Aug 17, 2016
fabpot added a commit that referenced this pull requestAug 17, 2016
This PR was merged into the 2.7 branch.Discussion----------[HttpKernel] Fix HttpCache validation HTTP method| Q             | A| ------------- | ---| Branch?       | 2.7| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#19582| License       | MIT| Doc PR        | -Commits-------1a8a8af [HttpKernel] Fix HttpCache validation HTTP method
@tgalopintgalopin deleted the http-cache-method branchAugust 17, 2016 18:33
This was referencedSep 2, 2016
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

4 participants

@tgalopin@dunglas@fabpot@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp