Exceptions
Exceptions 2
Symfony\Component\HttpKernel\Exception\ BadRequestHttpException
Show exception properties
Symfony\Component\HttpKernel\Exception\BadRequestHttpException {#398 -statusCode: 400 -headers: [] }
try {$proxy_query = ProxyQuery::createFromRequest($request, 'url');$this->signer->checkSignedUrl($url);} catch (\InvalidArgumentException $e) {throw new BadRequestHttpException($e->getMessage(), $e);} catch (\Mapbender\CoreBundle\Component\Exception\ProxySignatureException $e) {throw new AccessDeniedHttpException($e->getMessage(), $e);}return $this->getQueryResponse($proxy_query, $request);}
in
vendor/symfony/http-kernel/HttpKernel.php
->
entryPointAction
(line 181)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response, $event);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 76)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try {return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {if ($e instanceof \Error && !$this->handleAllThrowables) {throw $e;}
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 197)
$this->boot();++$this->requestStackSize;$this->resetServices = true;try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
) {}public function run(): int{$response = $this->kernel->handle($this->request);if (Kernel::VERSION_ID >= 60400) {$response->send(false);if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in
vendor/autoload_runtime.php
->
run
(line 29)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
require_once('/data/mapbender/application/vendor/autoload_runtime.php')
in
public/index.php
(line 5)
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
InvalidArgumentException
*/private function __construct($url, $content, $headers){$parts = parse_url($url);if (empty($parts["host"])) {throw new \InvalidArgumentException("Missing host name");}$this->headers = array_replace($headers, array('Host' => $parts['host'],));$this->url = $url;
*/public static function createGet($url, $headers = array()){// strip fragment and trailing query param separators$url = rtrim(preg_replace('/#.*$/', '', $url), '&?');return new static($url, null, $headers);}/*** Factory method for ProxyQuery instances appropriate for POST request.* NOTE: DOES NOT deduplicate query params. Use Utils method if you need help
$url = Utils::filterDuplicateQueryParams($url, false);$headers = Utils::getHeadersFromRequest($request);if ($request->getMethod() === 'POST') {return static::createPost($url, $request->getContent(), $headers);} else {return static::createGet($url, $headers);}}/*** @param string $url
ProxyQuery::createFromRequest()
in
mapbender/src/OwsProxy3/CoreBundle/Controller/OwsProxyController.php
(line 38)
public function entryPointAction(Request $request){$url = $request->query->get('url');try {$proxy_query = ProxyQuery::createFromRequest($request, 'url');$this->signer->checkSignedUrl($url);} catch (\InvalidArgumentException $e) {throw new BadRequestHttpException($e->getMessage(), $e);} catch (\Mapbender\CoreBundle\Component\Exception\ProxySignatureException $e) {throw new AccessDeniedHttpException($e->getMessage(), $e);
in
vendor/symfony/http-kernel/HttpKernel.php
->
entryPointAction
(line 181)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response, $event);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 76)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try {return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {if ($e instanceof \Error && !$this->handleAllThrowables) {throw $e;}
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 197)
$this->boot();++$this->requestStackSize;$this->resetServices = true;try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
) {}public function run(): int{$response = $this->kernel->handle($this->request);if (Kernel::VERSION_ID >= 60400) {$response->send(false);if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in
vendor/autoload_runtime.php
->
run
(line 29)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
require_once('/data/mapbender/application/vendor/autoload_runtime.php')
in
public/index.php
(line 5)
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Logs
| Level | Channel | Message |
|---|---|---|
| INFO 01:22:46 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "latest"
},
"request_uri": "https://schulung.foss.academy/mapbender/_profiler/latest?ip=187.183.79.187&type=request",
"method": "GET"
}
|
Stack Traces 2
|
[2/2]
BadRequestHttpException
|
|---|
Symfony\Component\HttpKernel\Exception\BadRequestHttpException:
Missing host name
at mapbender/src/OwsProxy3/CoreBundle/Controller/OwsProxyController.php:41
at OwsProxy3\CoreBundle\Controller\OwsProxyController->entryPointAction()
(vendor/symfony/http-kernel/HttpKernel.php:181)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:197)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:29)
at require_once('/data/mapbender/application/vendor/autoload_runtime.php')
(public/index.php:5)
|
|
[1/2]
InvalidArgumentException
|
|---|
InvalidArgumentException:
Missing host name
at mapbender/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php:101
at OwsProxy3\CoreBundle\Component\ProxyQuery->__construct()
(mapbender/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php:38)
at OwsProxy3\CoreBundle\Component\ProxyQuery::createGet()
(mapbender/src/OwsProxy3/CoreBundle/Component/ProxyQuery.php:87)
at OwsProxy3\CoreBundle\Component\ProxyQuery::createFromRequest()
(mapbender/src/OwsProxy3/CoreBundle/Controller/OwsProxyController.php:38)
at OwsProxy3\CoreBundle\Controller\OwsProxyController->entryPointAction()
(vendor/symfony/http-kernel/HttpKernel.php:181)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:197)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:29)
at require_once('/data/mapbender/application/vendor/autoload_runtime.php')
(public/index.php:5)
|