function AbstractSurrogate::needsParsing
Overrides SurrogateInterface::needsParsing
File
-
vendor/
symfony/ http-kernel/ HttpCache/ AbstractSurrogate.php, line 60
Class
- AbstractSurrogate
- Abstract class implementing Surrogate capabilities to Request and Response instances.
Namespace
Symfony\Component\HttpKernel\HttpCacheCode
public function needsParsing(Response $response) : bool {
if (!($control = $response->headers
->get('Surrogate-Control'))) {
return false;
}
$pattern = \sprintf('#content="[^"]*%s/1.0[^"]*"#', strtoupper($this->getName()));
return (bool) preg_match($pattern, $control);
}