bug #20218 [HttpFoundation] no 304 response if method is not cacheable (xabbuh)
This PR was merged into the 2.7 branch.
Discussion
----------
[HttpFoundation] no 304 response if method is not cacheable
| 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 |
Since #19321 OPTIONS and TRACE are considered safe methods. But both methods should not lead to "304 Not modified" responses.
Commits
-------
3d6b450
no 304 response if method is not cacheable
This commit is contained in:
commit
8d218e7f50
@ -1000,7 +1000,7 @@ class Response
|
|||||||
*/
|
*/
|
||||||
public function isNotModified(Request $request)
|
public function isNotModified(Request $request)
|
||||||
{
|
{
|
||||||
if (!$request->isMethodSafe()) {
|
if (!$request->isMethodCacheable()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user