1. Jesper Noehr
  2. django-piston
  3. Issues
Issue #178 new

Allow POST data to be parsed for DELETE requests

Anonymous created an issue

For whatever reason (presumably defending RESTful architecture to the letter of the law), POST data submitted to a DELETE handler is not processed and stored in the request.data attribtue for the Handler to use.

I don't really see the harm in allowing this functionality. I'm going to end up patching django-piston myself to allow for this, because I happen to want it, but I submit that this sort of thing should just be part of the library... there's no reason not to do it. I would contest that anyone building POST data into the request body of a DELETE request is doing so on purpose, and there is no reason to not parse it by default.

Comments (1)

  1. nanonyme

    I suspect the main reason for such data isn't handled is that RFC says "The DELETE method requests that the origin server delete the resource identified by the Request-URI". (http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html) So Request-URI must define the resource well enough that you can delete it. Sending data along with the delete instruction isn't forbidden but since it's not defined either, there's no obligation for any party to implement that kind of functionality.

  2. Log in to comment