File tree Expand file tree Collapse file tree 2 files changed +17
-1
lines changed
src/Symfony/Component/HttpFoundation Expand file tree Collapse file tree 2 files changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -587,7 +587,7 @@ public function setPublic()
587
587
*/
588
588
public function mustRevalidate ()
589
589
{
590
- return $ this ->headers ->hasCacheControlDirective ('must-revalidate ' ) || $ this ->headers ->has ('proxy-revalidate ' );
590
+ return $ this ->headers ->hasCacheControlDirective ('must-revalidate ' ) || $ this ->headers ->hasCacheControlDirective ('proxy-revalidate ' );
591
591
}
592
592
593
593
/**
Original file line number Diff line number Diff line change @@ -92,6 +92,22 @@ public function testMustRevalidate()
92
92
$ this ->assertFalse ($ response ->mustRevalidate ());
93
93
}
94
94
95
+ public function testMustRevalidateWithMustRevalidateCacheControlHeader ()
96
+ {
97
+ $ response = new Response ();
98
+ $ response ->headers ->set ('cache-control ' , 'must-revalidate ' );
99
+
100
+ $ this ->assertTrue ($ response ->mustRevalidate ());
101
+ }
102
+
103
+ public function testMustRevalidateWithProxyRevalidateCacheControlHeader ()
104
+ {
105
+ $ response = new Response ();
106
+ $ response ->headers ->set ('cache-control ' , 'proxy-revalidate ' );
107
+
108
+ $ this ->assertTrue ($ response ->mustRevalidate ());
109
+ }
110
+
95
111
public function testSetNotModified ()
96
112
{
97
113
$ response = new Response ();
You can’t perform that action at this time.
0 commit comments