1
1
<?php
2
2
3
+ /*
4
+ * This file is part of the Symfony package.
5
+ *
6
+ * (c) Fabien Potencier <fabien@symfony.com>
7
+ *
8
+ * For the full copyright and license information, please view the LICENSE
9
+ * file that was distributed with this source code.
10
+ */
11
+
3
12
/*
4
13
* This file is part of the Symfony package.
5
14
*
@@ -382,7 +391,7 @@ protected function validate(Request $request, Response $entry, $catch = false)
382
391
383
392
// add our cached last-modified validator
384
393
if ($ entry ->headers ->has ('Last-Modified ' )) {
385
- $ subRequest ->headers ->set ('if_modified_since ' , $ entry ->headers ->get ('Last-Modified ' ));
394
+ $ subRequest ->headers ->set ('If-Modified-Since ' , $ entry ->headers ->get ('Last-Modified ' ));
386
395
}
387
396
388
397
// Add our cached etag validator to the environment.
@@ -391,7 +400,7 @@ protected function validate(Request $request, Response $entry, $catch = false)
391
400
$ cachedEtags = $ entry ->getEtag () ? [$ entry ->getEtag ()] : [];
392
401
$ requestEtags = $ request ->getETags ();
393
402
if ($ etags = array_unique (array_merge ($ cachedEtags , $ requestEtags ))) {
394
- $ subRequest ->headers ->set ('if_none_match ' , implode (', ' , $ etags ));
403
+ $ subRequest ->headers ->set ('If-None-Match ' , implode (', ' , $ etags ));
395
404
}
396
405
397
406
$ response = $ this ->forward ($ subRequest , $ catch , $ entry );
@@ -444,8 +453,8 @@ protected function fetch(Request $request, $catch = false)
444
453
}
445
454
446
455
// avoid that the backend sends no content
447
- $ subRequest ->headers ->remove ('if_modified_since ' );
448
- $ subRequest ->headers ->remove ('if_none_match ' );
456
+ $ subRequest ->headers ->remove ('If-Modified-Since ' );
457
+ $ subRequest ->headers ->remove ('If-None-Match ' );
449
458
450
459
$ response = $ this ->forward ($ subRequest , $ catch );
451
460
0 commit comments