'allow_redirects' => false
]);
if (in_array($res->getStatusCode(), [301, 302, 303, 307, 308])) {
$redirectUrl = $res->getHeaderLine('Location');
return new RedirectResponse($this->configService->getBaseUrl() . parse_url($redirectUrl)['path'], $res->getStatusCode());
}
$html = $this->parserService->parseHtml($res->getBody()->getContents());
}catch (ServerException $exception){
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) {
Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet());
}
try {
return $kernel->handle($request, $type, $catch);
} finally {
// restore global state
Request::setTrustedProxies($trustedProxies, $trustedHeaderSet);
}
}
if ($this->surrogate) {
$this->surrogate->addSurrogateCapability($request);
}
// always a "master" request (as the real master request can be in cache)
$response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MAIN_REQUEST, $catch);
/*
* Support stale-if-error given on Responses or as a config option.
* RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual
* Cache-Control directives) that
protected function forward(Request $request, bool $catch = false, ?Response $entry = null)
{
$this->getKernel()->boot();
$this->getKernel()->getContainer()->set('cache', $this);
return parent::forward($request, $catch, $entry);
}
/**
* Returns an array of options to customize the Cache configuration.
*
// avoid that the backend sends no content
$subRequest->headers->remove('If-Modified-Since');
$subRequest->headers->remove('If-None-Match');
$response = $this->forward($subRequest, $catch);
if ($response->isCacheable()) {
$this->store($request, $response);
}
}
if (null === $entry) {
$this->record($request, 'miss');
return $this->fetch($request, $catch);
}
if (!$this->isFreshEnough($request, $entry)) {
$this->record($request, 'stale');
reload the cache by fetching a fresh response and caching it (if possible).
*/
$this->record($request, 'reload');
$response = $this->fetch($request, $catch);
} else {
$response = $this->lookup($request, $catch);
}
$this->restoreResponseBody($request, $response);
if (HttpKernelInterface::MAIN_REQUEST === $type) {
{
if (!$this->booted) {
$container = $this->container ?? $this->preBoot();
if ($container->has('http_cache')) {
return $container->get('http_cache')->handle($request, $type, $catch);
}
}
$this->boot();
++$this->requestStackSize;
$kernel->boot();
$kernel->getContainer()->get('cloud_connection_service')->checkIfProjectIsRootProject($request);
$kernel->getContainer()->get('cloud_connection_service')->establishConnection($request);
}
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
ErrorException
|
---|
ErrorException: Warning: Undefined array key "path" at src/ProxyController.php:47 at App\ProxyController->indexAction() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:86) at Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:481) at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward() (vendor/symfony/framework-bundle/HttpCache/HttpCache.php:73) at Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->forward() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:454) at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:348) at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:226) at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle() (vendor/symfony/http-kernel/Kernel.php:193) at Symfony\Component\HttpKernel\Kernel->handle() (index.php/:22) |