- // 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')) {