if ($referer = $request->headers->get('referer')) {
$message .= sprintf(' (from "%s")', $referer);
}
throw new NotFoundHttpException($message, $e);
} catch (MethodNotAllowedException $e) {
$message = sprintf('No route found for "%s %s": Method Not Allowed (Allow: %s)', $request->getMethod(), $request->getPathInfo(), implode(', ', $e->getAllowedMethods()));
throw new MethodNotAllowedHttpException($e->getAllowedMethods(), $message, $e);
}
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$trustedProxies[] = '127.0.0.1';
Request::setTrustedProxies($trustedProxies, Request::HEADER_X_FORWARDED_ALL);
}
// always a "master" request (as the real master request can be in cache)
$response = $this->kernel->handle($request, HttpKernelInterface::MASTER_REQUEST, $catch);
// FIXME: we probably need to also catch exceptions if raw === true
// we don't implement the stale-if-error on Requests, which is nonetheless part of the RFC
if (null !== $entry && in_array($response->getStatusCode(), array(500, 502, 503, 504))) {
if (null === $age = $entry->headers->getCacheControlDirective('stale-if-error')) {
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::MASTER_REQUEST === $type && $this->options['debug']) {
return $this->mergeDefaults(array_replace($matches, array('_route' => 'fos_js_routing_js')), array ( '_controller' => 'fos_js_routing.controller:indexAction', '_format' => 'js',));
}
not_fos_js_routing_js:
throw 0 < count($allow) ? new MethodNotAllowedException(array_unique($allow)) : new ResourceNotFoundException();
}
}
// add attributes based on the request (routing)
try {
// matching a request is more powerful than matching a URL path + context, so try that first
if ($this->matcher instanceof RequestMatcherInterface) {
$parameters = $this->matcher->matchRequest($request);
} else {
$parameters = $this->matcher->match($request->getPathInfo());
}
if (null !== $this->logger) {
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$trustedProxies[] = '127.0.0.1';
Request::setTrustedProxies($trustedProxies, Request::HEADER_X_FORWARDED_ALL);
}
// always a "master" request (as the real master request can be in cache)
$response = $this->kernel->handle($request, HttpKernelInterface::MASTER_REQUEST, $catch);
// FIXME: we probably need to also catch exceptions if raw === true
// we don't implement the stale-if-error on Requests, which is nonetheless part of the RFC
if (null !== $entry && in_array($response->getStatusCode(), array(500, 502, 503, 504))) {
if (null === $age = $entry->headers->getCacheControlDirective('stale-if-error')) {
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::MASTER_REQUEST === $type && $this->options['debug']) {
No log messages
[2/2] NotFoundHttpException |
---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /informacje/procedury-zakupu.html" (from "http://ap-company.pl/informacje/procedury-zakupu.html") at vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:123 at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) at call_user_func(array(object(RouterListener), 'onKernelRequest'), object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php:104) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher)) at call_user_func(object(WrappedListener), object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:212) at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(GetResponseEvent)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:44) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:144) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:129) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:169) at Symfony\Component\HttpKernel\Kernel->handle(object(Request), 1, true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:465) at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(object(Request), true, null) (vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php:57) at Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->forward(object(Request), true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:419) at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch(object(Request), true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:316) at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup(object(Request), true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:191) at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(object(Request)) (public_html/app.php:15) |
[1/2] ResourceNotFoundException |
---|
Symfony\Component\Routing\Exception\ResourceNotFoundException: at var/cache/prod/appProdDebugProjectContainerUrlMatcher.php:910 at appProdDebugProjectContainerUrlMatcher->match('/informacje/procedury-zakupu.html') (vendor/symfony/symfony/src/Symfony/Component/Routing/Matcher/UrlMatcher.php:106) at Symfony\Component\Routing\Matcher\UrlMatcher->matchRequest(object(Request)) (vendor/symfony/symfony/src/Symfony/Component/Routing/Router.php:264) at Symfony\Component\Routing\Router->matchRequest(object(Request)) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/EventListener/RouterListener.php:99) at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) at call_user_func(array(object(RouterListener), 'onKernelRequest'), object(GetResponseEvent), 'kernel.request', object(TraceableEventDispatcher)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php:104) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher)) at call_user_func(object(WrappedListener), object(GetResponseEvent), 'kernel.request', object(ContainerAwareEventDispatcher)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:212) at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(GetResponseEvent)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/EventDispatcher.php:44) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) (vendor/symfony/symfony/src/Symfony/Component/EventDispatcher/Debug/TraceableEventDispatcher.php:144) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch('kernel.request', object(GetResponseEvent)) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:129) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:169) at Symfony\Component\HttpKernel\Kernel->handle(object(Request), 1, true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:465) at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(object(Request), true, null) (vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/HttpCache/HttpCache.php:57) at Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->forward(object(Request), true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:419) at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch(object(Request), true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:316) at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup(object(Request), true) (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpCache/HttpCache.php:191) at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(object(Request)) (public_html/app.php:15) |