cakephp/cakephp — pull request #4108 by stevetauber (2014-07-29 14:19:32+00:00)
Title: Updating RequestHandlerComponent to accept body of HTTP Delete requests

I was trying to use HTTP DELETE along with a JSON encoded body. CakePHP was ignoring the body content while it works for POST and PUT. I traced it down to this line of code.

During startup, the `RequestHandlerComponent` tries to set `$controller->request->data` if the `requestedType` is valid. This was not occurring for DELETE requests because of the checks in `requestedWith`
https://github.com/cakephp/cakephp/blob/master/lib/Cake/Controller/Component/RequestHandlerComponent.php#L216

I've patched `requestedWith` to allow DELETE. There are considerable arguments why the body of a DELETE request should be allowed, the strongest being that it the RFC allows it. Here is a stack overflow discussion of that issue at hand:

http://stackoverflow.com/questions/14323716/restful-alternatives-to-delete-request-body