Issue #3090626 by neclimdul: ContentTypeHeaderMatcher dx tests broken with some nginx configs

merge-requests/2419/head
Alex Pott 2019-10-30 16:59:39 +01:00
parent 49d60f113d
commit f995409be4
No known key found for this signature in database
GPG Key ID: 31905460D4A69276
1 changed files with 1 additions and 1 deletions

View File

@ -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 {