< Previous
Next >

[Comments] (5) : Does anyone know why the HTML standard doesn't allow PUT or DELETE as form actions? Sure, they're not widely used, but neither is the form's TITLE attribute, or the KBD tag, and they're in there.

Filed under:

Comments:

Posted by Steve Jenson at Tue Feb 08 2005 13:22

It looks like XForms won't be allowing them, either. That's too bad. The semantics of PUT _are_ a little weird to fit into forms, since you wouldn't really PUT a form to a URI. But DELETE seems perfectly acceptable, just don't expect your form values to be used for anything.

Posted by Aaron Swartz at Fri Feb 11 2005 18:05

What would you do with the contents of the form on DELETE?

And since PUT would probably need to end up putting the x-form-encoded text as the document to a static URL, it'd be _really_ rare.

Posted by Leonard at Fri Feb 11 2005 22:38

I say you can implement the semantics of PUT or DELETE however you want, just like you can implement POST however you want.

Posted by Leonard at Fri Feb 11 2005 23:00

Specifically, the page you PUT to doesn't have to be static. All PUT does is create the resource you're PUTting to. It's up to the server how the resource is stored and how the encoded data is transformed into the resource.

Similarly, if you submitted a DELETE command to a resource and it was accepted, that resource would stop existing. It would turn into a 404 or 410. It doesn't have to be that a file on disk stopped existing.


[Main]

Unless otherwise noted, all content licensed by Leonard Richardson
under a Creative Commons License.