comparison vendor/symfony/http-kernel/HttpCache/HttpCache.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents 1fec387a4317
children 129ea1e6d783
comparison
equal deleted inserted replaced
15:e200cb7efeb3 16:c2387f117808
163 public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true) 163 public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
164 { 164 {
165 // FIXME: catch exceptions and implement a 500 error page here? -> in Varnish, there is a built-in error page mechanism 165 // FIXME: catch exceptions and implement a 500 error page here? -> in Varnish, there is a built-in error page mechanism
166 if (HttpKernelInterface::MASTER_REQUEST === $type) { 166 if (HttpKernelInterface::MASTER_REQUEST === $type) {
167 $this->traces = array(); 167 $this->traces = array();
168 $this->request = $request; 168 // Keep a clone of the original request for surrogates so they can access it.
169 // We must clone here to get a separate instance because the application will modify the request during
170 // the application flow (we know it always does because we do ourselves by setting REMOTE_ADDR to 127.0.0.1
171 // and adding the X-Forwarded-For header, see HttpCache::forward()).
172 $this->request = clone $request;
169 if (null !== $this->surrogate) { 173 if (null !== $this->surrogate) {
170 $this->surrogateCacheStrategy = $this->surrogate->createCacheStrategy(); 174 $this->surrogateCacheStrategy = $this->surrogate->createCacheStrategy();
171 } 175 }
172 } 176 }
173 177