PUT (and friends) bug?
Lennon Day-Reynolds
rcoder at gmail.com
Fri Sep 28 15:26:56 EDT 2007
On 9/28/07, Nathaniel Talbott <nathaniel at talbott.ws> wrote:
> As far as I can tell, sending an actual HTTP PUT request to a Camping
> app will never parse the params out of the request body - or am I
> going nuts? This code seems to say only POST's will parse the request
> body:
>
> elsif @method == "post" and \
> e.CONTENT_TYPE == "application/x-www-form-urlencoded"
> q.u(C.qsp(@in.read))
> end
I honestly wouldn't expect PUT (or any other HTTP actions other than
GET, POST, and HEAD) to pass the input through a normal form-decoding
step -- most of the time, the "payload" for a PUT is going to be XML,
JSON, or even raw binary.
Since browsers won't do PUT, why build in support for what amounts to
a browser-only MIME type (application/x-www-form-urlencoded)?
-Lennon
More information about the Camping-list
mailing list