We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
This bug occurs when AppCache is used and the response is pulled from cache.
Serving response body with 304 status code is against HTTP spec.
This bug can be fixed here:
diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index 705e762..78960a2 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -550,7 +550,7 @@ class HttpCache implements HttpKernelInterface */ private function restoreResponseBody(Request $request, Response $response) { - if ('head' === strtolower($request->getMethod())) { + if ('head' === strtolower($request->getMethod()) || 304 == $response->getStatusCode()) { $response->setContent(''); $response->headers->remove('X-Body-Eval'); $response->headers->remove('X-Body-File');
but the solution will need some unit testing
The text was updated successfully, but these errors were encountered:
[HttpKernel] Suppress response content for 304 responses out of the c…
05c9906
…ache Fixes symfony#1413
f406e3d
Successfully merging a pull request may close this issue.
This bug occurs when AppCache is used and the response is pulled from cache.
Serving response body with 304 status code is against HTTP spec.
This bug can be fixed here:
but the solution will need some unit testing
The text was updated successfully, but these errors were encountered: