File tree 1 file changed +2
-2
lines changed
src/Symfony/Component/HttpKernel/HttpCache
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ class HttpCache implements HttpKernelInterface
55
55
*
56
56
* * allow_revalidate Specifies whether the client can force a cache revalidate by including
57
57
* a Cache-Control "max-age=0" directive in the request. Set it to ``true``
58
- * for compliance with RFC 2616. (default: false)
58
+ * for compliance with RFC 2616. (default: false)
59
59
*
60
60
* * stale_while_revalidate Specifies the default number of seconds (the granularity is the second as the
61
61
* Response TTL precision is a second) during which the cache can immediately return
@@ -550,7 +550,7 @@ protected function store(Request $request, Response $response)
550
550
*/
551
551
private function restoreResponseBody (Request $ request , Response $ response )
552
552
{
553
- if ('head ' === strtolower ($ request ->getMethod ())) {
553
+ if ('head ' === strtolower ($ request ->getMethod ()) || 304 === $ response -> getStatusCode () ) {
554
554
$ response ->setContent ('' );
555
555
$ response ->headers ->remove ('X-Body-Eval ' );
556
556
$ response ->headers ->remove ('X-Body-File ' );
You can’t perform that action at this time.
0 commit comments