|
@@ -47,16 +47,11 @@ class WebDebugToolbar
|
|
|
|
|
|
$request = $this->container->getRequestService();
|
|
|
|
|
|
- if (
|
|
|
- '3' === substr($response->getStatusCode(), 0, 1)
|
|
|
- ||
|
|
|
- ($response->headers->has('Content-Type') && false === strpos($response->headers->get('Content-Type'), 'html'))
|
|
|
- ||
|
|
|
- 'html' !== $request->getRequestFormat()
|
|
|
- ||
|
|
|
- $request->isXmlHttpRequest()
|
|
|
- )
|
|
|
- {
|
|
|
+ if ('3' === substr($response->getStatusCode(), 0, 1)
|
|
|
+ || ($response->headers->has('Content-Type') && false === strpos($response->headers->get('Content-Type'), 'html'))
|
|
|
+ || 'html' !== $request->getRequestFormat()
|
|
|
+ || $request->isXmlHttpRequest()
|
|
|
+ ) {
|
|
|
return $response;
|
|
|
}
|
|
|
|