Skip to content

Commit 8d218e7

Browse files
committed
bug symfony#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 symfony#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
2 parents 7e2f24f + 3d6b450 commit 8d218e7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/HttpFoundation/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1000,7 +1000,7 @@ public function setVary($headers, $replace = true)
10001000
*/
10011001
public function isNotModified(Request $request)
10021002
{
1003-
if (!$request->isMethodSafe()) {
1003+
if (!$request->isMethodCacheable()) {
10041004
return false;
10051005
}
10061006

0 commit comments

Comments
 (0)