diff --git a/system/CodeIgniter.php b/system/CodeIgniter.php index 0579ea2edd3c..1feb20931991 100644 --- a/system/CodeIgniter.php +++ b/system/CodeIgniter.php @@ -407,6 +407,11 @@ protected function handleRequest(?RouteCollectionInterface $routes, Cache $cache { return $returnResponse ? $possibleResponse : $possibleResponse->pretend($this->useSafeOutput)->send(); } + + if ($possibleResponse instanceof Request) + { + $this->request = $possibleResponse; + } } $returned = $this->startController();