X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Flib%2FDrupal%2FCore%2FRouting%2FContentTypeHeaderMatcher.php;h=7d66b50ecefd80ce5b5584fc07217030d85e54b8;hb=1c1cb0980bfa6caf0c24cce671b6bb541dc87583;hp=719eeb13289193e074af96bda92dbf2921a70692;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/lib/Drupal/Core/Routing/ContentTypeHeaderMatcher.php b/web/core/lib/Drupal/Core/Routing/ContentTypeHeaderMatcher.php index 719eeb132..7d66b50ec 100644 --- a/web/core/lib/Drupal/Core/Routing/ContentTypeHeaderMatcher.php +++ b/web/core/lib/Drupal/Core/Routing/ContentTypeHeaderMatcher.php @@ -15,10 +15,10 @@ class ContentTypeHeaderMatcher implements FilterInterface { * {@inheritdoc} */ public function filter(RouteCollection $collection, Request $request) { - // The Content-type header does not make sense on GET requests, because GET - // requests do not carry any content. Nothing to filter in this case. Same - // for all other safe methods. - if ($request->isMethodSafe(FALSE)) { + // The Content-type header does not make sense on GET or DELETE requests, + // because they do not carry any content. Nothing to filter in this case. + // Same for all other safe methods. + if ($request->isMethodSafe(FALSE) || $request->isMethod('DELETE')) { return $collection; }