8000 [HttpKernel] fixed internal subrequests having an if-modified-since-header by MalteWunsch · Pull Request #19290 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[HttpKernel] fixed internal subrequests having an if-modified-since-header #19290

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

Closed
wants to merge 2 commits into from
Closed

[HttpKernel] fixed internal subrequests having an if-modified-since-header #19290

wants to merge 2 commits into from

Conversation

MalteWunsch
Copy link
Contributor
Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets -
License MIT
Doc PR -

As the InlineFragmentRenderer has no access to a cached copy of a subrequest's target and hence couldn't handle a response with a HTTP status code of 304 (not modified), it makes no sense to send an if-not-modified-since header.

…eader

As the InlineFragmentRenderer has no access to a cached copy of a subrequest's target and hence couldn't handle a response with a HTTP status code of 304 (not modified), it makes no sense to send an if-not-modified-since header.
@ro0NL
Copy link
Contributor
ro0NL commented Jul 5, 2016

This also affects If-None-Match right?

@mpdude
Copy link
Contributor
mpdude commented Jul 5, 2016

Here's how the HttpCache handles this:

https://github.com/symfony/symfony/blob/master/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php#L420

It does not tweak the $_SERVER vars but uses the Request API to remove the information after the HTTP_* values have been interpreted. This might catch other ways(TM) of sneaking in the problematic header values.

@MalteWunsch
Copy link
Contributor Author

@ro0NL I think you're right and have added the removal of this header accordingly.

@fabpot
Copy link
Member
fabpot commented Jul 8, 2016

Thank you @MalteWunsch.

fabpot added a commit that referenced this pull request Jul 8, 2016
…ied-since-header (MalteWunsch)

This PR was squashed before being merged into the 2.7 branch (closes #19290).

Discussion
----------

[HttpKernel] fixed internal subrequests having an if-modified-since-header

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | -
| License       | MIT
| Doc PR        | -

As the InlineFragmentRenderer has no access to a cached copy of a subrequest's target and hence couldn't handle a response with a HTTP status code of 304 (not modified), it makes no sense to send an if-not-modified-since header.

Commits
-------

e90038c [HttpKernel] fixed internal subrequests having an if-modified-since-header
@fabpot fabpot closed this Jul 8, 2016
@mpdude
Copy link
Contributor
mpdude commented Jul 9, 2016

Congrats @MalteWunsch, you're a Symfony contributor now :-)

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.

5 participants
0