Update to Drupal 8.2.6. For more information, see https://www.drupal.org/project/drupal/releases/8.2.6
This commit is contained in:
parent
db56c09587
commit
f1e72395cb
588 changed files with 26857 additions and 2777 deletions
|
@ -153,9 +153,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
|||
/**
|
||||
* Gets the Surrogate instance.
|
||||
*
|
||||
* @throws \LogicException
|
||||
*
|
||||
* @return SurrogateInterface A Surrogate instance
|
||||
*
|
||||
* @throws \LogicException
|
||||
*/
|
||||
public function getSurrogate()
|
||||
{
|
||||
|
@ -169,10 +169,10 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
|||
/**
|
||||
* Gets the Esi instance.
|
||||
*
|
||||
* @throws \LogicException
|
||||
*
|
||||
* @return Esi An Esi instance
|
||||
*
|
||||
* @throws \LogicException
|
||||
*
|
||||
* @deprecated since version 2.6, to be removed in 3.0. Use getSurrogate() instead
|
||||
*/
|
||||
public function getEsi()
|
||||
|
@ -202,9 +202,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
|||
}
|
||||
$this->traces[$request->getMethod().' '.$path] = array();
|
||||
|
||||
if (!$request->isMethodSafe()) {
|
||||
if (!$request->isMethodSafe(false)) {
|
||||
$response = $this->invalidate($request, $catch);
|
||||
} elseif ($request->headers->has('expect')) {
|
||||
} elseif ($request->headers->has('expect') || !$request->isMethodCacheable()) {
|
||||
$response = $this->pass($request, $catch);
|
||||
} else {
|
||||
$response = $this->lookup($request, $catch);
|
||||
|
@ -374,7 +374,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
|||
$subRequest = clone $request;
|
||||
|
||||
// send no head requests because we want content
|
||||
$subRequest->setMethod('GET');
|
||||
if ('HEAD' === $request->getMethod()) {
|
||||
$subRequest->setMethod('GET');
|
||||
}
|
||||
|
||||
// add our cached last-modified validator
|
||||
$subRequest->headers->set('if_modified_since', $entry->headers->get('Last-Modified'));
|
||||
|
@ -435,7 +437,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
|||
$subRequest = clone $request;
|
||||
|
||||
// send no head requests because we want content
|
||||
$subRequest->setMethod('GET');
|
||||
if ('HEAD' === $request->getMethod()) {
|
||||
$subRequest->setMethod('GET');
|
||||
}
|
||||
|
||||
// avoid that the backend sends no content
|
||||
$subRequest->headers->remove('if_modified_since');
|
||||
|
@ -600,6 +604,9 @@ class HttpCache implements HttpKernelInterface, TerminableInterface
|
|||
*/
|
||||
protected function store(Request $request, Response $response)
|
||||
{
|
||||
if (!$response->headers->has('Date')) {
|
||||
$response->setDate(\DateTime::createFromFormat('U', time()));
|
||||
}
|
||||
try {
|
||||
$this->store->write($request, $response);
|
||||
|
||||
|
|
Reference in a new issue