Mercurial > hg > isophonics-drupal-site
diff core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php @ 16:c2387f117808
Routine composer update
author | Chris Cannam |
---|---|
date | Tue, 10 Jul 2018 15:07:59 +0100 |
parents | 4c8ae668cc8c |
children |
line wrap: on
line diff
--- a/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php Thu Apr 26 11:26:54 2018 +0100 +++ b/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php Tue Jul 10 15:07:59 2018 +0100 @@ -46,7 +46,9 @@ } // Determine the request format using the negotiator. - $request->setRequestFormat($this->getContentType($request)); + if ($requested_format = $this->getContentType($request)) { + $request->setRequestFormat($requested_format); + } return $this->app->handle($request, $type, $catch); } @@ -88,8 +90,8 @@ return $request->query->get('_format'); } - // Do HTML last so that it always wins. - return 'html'; + // No format was specified in the request. + return NULL; } }