File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed
src/Symfony/Component/HttpFoundation Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -288,7 +288,7 @@ protected function computeCacheControlValue()
288288 }
289289
290290 $ header = $ this ->getCacheControlHeader ();
291- if (isset ($ this ->cacheControl ['public ' ]) || isset ($ this ->cacheControl ['private ' ])) {
291+ if (isset ($ this ->cacheControl ['public ' ]) || isset ($ this ->cacheControl ['private ' ]) || isset ( $ this -> cacheControl [ ' no-cache ' ]) ) {
292292 return $ header ;
293293 }
294294
Original file line number Diff line number Diff line change @@ -36,6 +36,10 @@ public function provideAllPreserveCase()
3636 array ('fOo ' => 'BAR ' ),
3737 array ('fOo ' => array ('BAR ' ), 'Cache-Control ' => array ('no-cache ' )),
3838 ),
39+ array (
40+ array ('fOo ' => 'BAR ' , 'Cache-Control ' => array ('no-cache ' )),
41+ array ('fOo ' => array ('BAR ' ), 'Cache-Control ' => array ('no-cache ' )),
42+ ),
3943 array (
4044 array ('ETag ' => 'xyzzy ' ),
4145 array ('ETag ' => array ('xyzzy ' ), 'Cache-Control ' => array ('private, must-revalidate ' )),
@@ -63,6 +67,14 @@ public function provideAllPreserveCase()
6367 );
6468 }
6569
70+ public function testHeadersArePreserved ()
71+ {
72+ $ bag1 = new ResponseHeaderBag (array ('test ' ));
73+ $ bag2 = new ResponseHeaderBag ($ bag1 ->allPreserveCase ());
5DA9
code>74+
75+ $ this ->assertEquals ($ bag1 ->allPreserveCase (), $ bag2 ->allPreserveCase ());
76+ }
77+
6678 public function testCacheControlHeader ()
6779 {
6880 $ bag = new ResponseHeaderBag (array ());
You can’t perform that action at this time.
0 commit comments