From f995409be43c4cf62d49e095ba4046915f0bdedc Mon Sep 17 00:00:00 2001 From: Alex Pott <alex.a.pott@googlemail.com> Date: Wed, 30 Oct 2019 16:59:39 +0100 Subject: [PATCH] Issue #3090626 by neclimdul: ContentTypeHeaderMatcher dx tests broken with some nginx configs --- core/lib/Drupal/Core/Routing/ContentTypeHeaderMatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/lib/Drupal/Core/Routing/ContentTypeHeaderMatcher.php b/core/lib/Drupal/Core/Routing/ContentTypeHeaderMatcher.php index 7d66b50ecefd..d6452e8be03e 100644 --- a/core/lib/Drupal/Core/Routing/ContentTypeHeaderMatcher.php +++ b/core/lib/Drupal/Core/Routing/ContentTypeHeaderMatcher.php @@ -42,7 +42,7 @@ public function filter(RouteCollection $collection, Request $request) { // We do not throw a // \Symfony\Component\Routing\Exception\ResourceNotFoundException here // because we don't want to return a 404 status code, but rather a 415. - if (!$request->headers->has('Content-Type')) { + if (!$request->headers->get('Content-Type', FALSE)) { throw new UnsupportedMediaTypeHttpException('No "Content-Type" request header specified'); } else { -- GitLab