You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When HttpCache is allowed to preserve Last-Modified (see #42355) clients will execute subsequent requests with If-Modified-Since. If cache then returns a 304 Not Modified this will result in an exception.
…aleho)
This PR was merged into the 4.4 branch.
Discussion
----------
[HttpKernel] [HttpCache] Don't throw on 304 Not Modified
| Q | A
| ------------- | ---
| Branch? | 4.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Tickets | Fixes#43997
| License | MIT
| Doc PR | ~
If the response cache keeps a `Last-Modified` header clients will request with `If-Modified-Since`.
The surrogate will not handle a `304 Not Modified` correctly, resulting in a 500 and a failed request.
This fixes that request / response cycle, as observed in testing PR #42355.
Commits
-------
d27f02a [HttpKernel] [HttpCache] Don't throw on 304 Not Modified
Symfony version(s) affected
4.4+
Description
When
HttpCache
is allowed to preserveLast-Modified
(see #42355) clients will execute subsequent requests withIf-Modified-Since
. If cache then returns a304 Not Modified
this will result in an exception.This cycle will continue:
Last-Modified
headerIf-Modified-Since
How to reproduce
Merge PR #42355 or check out https://github.com/aleho/symfony-httpcache for a minimal demo.
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: