You are here

public function SurrogateListener::onKernelResponse in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-kernel/EventListener/SurrogateListener.php \Symfony\Component\HttpKernel\EventListener\SurrogateListener::onKernelResponse()

Filters the Response.

Parameters

FilterResponseEvent $event A FilterResponseEvent instance:

File

vendor/symfony/http-kernel/EventListener/SurrogateListener.php, line 43

Class

SurrogateListener
SurrogateListener adds a Surrogate-Control HTTP header when the Response needs to be parsed for Surrogates.

Namespace

Symfony\Component\HttpKernel\EventListener

Code

public function onKernelResponse(FilterResponseEvent $event) {
  if (!$event
    ->isMasterRequest() || null === $this->surrogate) {
    return;
  }
  $this->surrogate
    ->addSurrogateControl($event
    ->getResponse());
}