8000 [HttpCache] fixed if-modified-since header default to an empty string… · symfony/symfony@d907bb0 · GitHub
[go: up one dir, main page]

Skip to content
Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d907bb0

Browse files
committed
[HttpCache] fixed if-modified-since header default to an empty string if the last-modified header was not set
1 parent 29cabf9 commit d907bb0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55
*
66
* (c) Fabien Potencier <fabien@symfony.com>
77
*
8-
* This code is partially based on the Rack-Cache library by Ryan Tomayko,
9-
* which is released under the MIT license.
10-
* (based on commit 02d2b48d75bcb63cf1c0c7149c077ad256542801)
11-
*
128
* For the full copyright and license information, please view the LICENSE
139
* file that was distributed with this source code.
1410
*/
@@ -352,7 +348,7 @@ protected function validate(Request $request, Response $entry, $catch = false)
352348
}
353349

354350
// add our cached last-modified validator
355-
$subRequest->headers->set('if_modified_since', $entry->headers->get('Last-Modified'));
351+
$subRequest->headers->set('if_modified_since', $entry->headers->get('Last-Modified', ''));
356352

357353
// Add our cached etag validator to the environment.
358354
// We keep the etags from the client to handle the case when the client

0 commit comments

Comments
 (0)
0