Commit 7dee9da3 authored by alexpott's avatar alexpott

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

(cherry picked from commit f995409b)
parent 091fbadd
...@@ -42,7 +42,7 @@ public function filter(RouteCollection $collection, Request $request) { ...@@ -42,7 +42,7 @@ public function filter(RouteCollection $collection, Request $request) {
// We do not throw a // We do not throw a
// \Symfony\Component\Routing\Exception\ResourceNotFoundException here // \Symfony\Component\Routing\Exception\ResourceNotFoundException here
// because we don't want to return a 404 status code, but rather a 415. // 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'); throw new UnsupportedMediaTypeHttpException('No "Content-Type" request header specified');
} }
else { else {
......
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