From 93e9337382e9983d724c501357fc2622df071e5a Mon Sep 17 00:00:00 2001 From: Christian Flothmann Date: Wed, 17 Mar 2021 21:16:29 +0100 Subject: [PATCH] enable HTTP method overrides as early as possible with the HTTP cache --- .../Bundle/FrameworkBundle/HttpCache/HttpCache.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php b/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php index 35ea73c235771..45b2ca785603e 100644 --- a/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php +++ b/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php @@ -18,6 +18,7 @@ use Symfony\Component\HttpKernel\HttpCache\Store; use Symfony\Component\HttpKernel\HttpCache\StoreInterface; use Symfony\Component\HttpKernel\HttpCache\SurrogateInterface; +use Symfony\Component\HttpKernel\HttpKernelInterface; use Symfony\Component\HttpKernel\KernelInterface; /** @@ -62,6 +63,15 @@ public function __construct(KernelInterface $kernel, $cache = null, SurrogateInt parent::__construct($kernel, $this->createStore(), $this->createSurrogate(), array_merge($this->options, $this->getOptions())); } + public function handle(Request $request, int $type = HttpKernelInterface::MASTER_REQUEST, bool $catch = true) + { + if ($this->kernel->getContainer()->getParameter('kernel.http_method_override')) { + Request::enableHttpMethodParameterOverride(); + } + + return parent::handle($request, $type, $catch); + } + /** * {@inheritdoc} */ pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy