Skip to content

Commit

Permalink
[HttpCache] fixed if-modified-since header default to an empty string…
Browse files Browse the repository at this point in the history
… if the last-modified header was not set
  • Loading branch information
akalineskou committed Oct 21, 2019
1 parent 29cabf9 commit d907bb0
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php
Expand Up @@ -5,10 +5,6 @@
*
* (c) Fabien Potencier <fabien@symfony.com>
*
* 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.
*/
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d907bb0

Please sign in to comment.