Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / lib / Drupal / Core / Routing / ContentTypeHeaderMatcher.php
index 719eeb13289193e074af96bda92dbf2921a70692..7d66b50ecefd80ce5b5584fc07217030d85e54b8 100644 (file)
@@ -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;
     }