From d907bb0a59b67413da02c8c364a3c9d269ee0470 Mon Sep 17 00:00:00 2001 From: Alex Kalineskou Date: Mon, 21 Oct 2019 22:33:54 +0300 Subject: [PATCH] [HttpCache] fixed if-modified-since header default to an empty string if the last-modified header was not set --- src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php index addeca8bae143..b81d627809d1b 100644 --- a/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php +++ b/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php @@ -5,10 +5,6 @@ * * (c) Fabien Potencier * - * This code is partially based on the Rack-Cache library by Ryan Tomayko, - * which is released under the MIT license. - * (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801) - * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ @@ -352,7 +348,7 @@ protected function validate(Request $request, Response $entry, $catch = false) } // add our cached last-modified validator - $subRequest->headers->set('if_modified_since', $entry->headers->get('Last-Modified')); + $subRequest->headers->set('if_modified_since', $entry->headers->get('Last-Modified', '')); // Add our cached etag validator to the environment. // We keep the etags from the client to handle the case when the client