ALPHA 3.0.2

This commit is contained in:
TheGamecraft
2018-09-05 11:35:41 -04:00
parent 4dbdc8fd19
commit 8ef8057bfa
771 changed files with 9284 additions and 5857 deletions

View File

@@ -165,7 +165,11 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
// FIXME: catch exceptions and implement a 500 error page here? -> in Varnish, there is a built-in error page mechanism
if (HttpKernelInterface::MASTER_REQUEST === $type) {
$this->traces = array();
$this->request = $request;
// Keep a clone of the original request for surrogates so they can access it.
// We must clone here to get a separate instance because the application will modify the request during
// the application flow (we know it always does because we do ourselves by setting REMOTE_ADDR to 127.0.0.1
// and adding the X-Forwarded-For header, see HttpCache::forward()).
$this->request = clone $request;
if (null !== $this->surrogate) {
$this->surrogateCacheStrategy = $this->surrogate->createCacheStrategy();
}