Commit 1afec3a9 authored by Crell's avatar Crell
Browse files

Add */* as a fallback for HTML for the test bot.

parent da5fba74
......@@ -31,7 +31,8 @@ class HtmlSubscriber implements EventSubscriberInterface {
* True if it is an event we should process as HTML, False otherwise.
*/
protected function isHtmlRequestEvent(GetResponseEvent $event) {
return (boolean)array_intersect(array('text/html', '*/*'), $event->getRequest()->getAcceptableContentTypes());
$acceptable_content_types = $event->getRequest()->getAcceptableContentTypes();
return in_array('text/html', $acceptable_content_types) || in_array('*/*', $acceptable_content_types);
}
/**
......@@ -87,6 +88,9 @@ public function onView(GetResponseEvent $event) {
$page_callback_result = $event->getControllerResult();
$event->setResponse(new Response(drupal_render_page($page_callback_result)));
}
else {
$event->setResponse(new Response('Requested MIME type not supported', 400));
}
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment