From f995409be43c4cf62d49e095ba4046915f0bdedc Mon Sep 17 00:00:00 2001 From: Alex Pott 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 7d66b50ecef..d6452e8be03 100644 --- a/core/lib/Drupal/Core/Routing/ContentTypeHeaderMatcher.php +++ b/core/lib/Drupal/Core/Routing/ContentTypeHeaderMatcher.php @@ -42,7 +42,7 @@ class ContentTypeHeaderMatcher implements FilterInterface { // 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 {