On 9/28/07, Nathaniel Talbott <[EMAIL PROTECTED]> wrote:
> It seems to me that most restful frameworks are assuming that you can
> PUT the same as you can POST, i.e. that other than the verb (and what
> you might do with it) the two will be treated the same.

This is a horrible Rails-ism, in my opinion. PUT and POST are entirely
different actions, and the weirdness that Rails uses to make one
masquerade as the other is hardly a "convention."

> I actually ran in to this problem while mussing around with my little
> Camping testing framework, since I was assuming that doing a proper
> PUT would have the same affect as doing a simulated PUT using a
> special query parameter. But I was surprised to find out that I was
> wrong, and that things aren't parsed as one would expect.
>
> Of course, there's also the fact that while browsers don't *currently*
> support form verbs besides POST, I'm hopeful that that may change
> eventually.

Sure, but in that case, they will likely be using PUT for direct file
uploads (i.e., in place of 'type="file"' inputs) not for structured
form submission, unless some data-binding framework like XForms has
been used to associate the form with a persistent data format.

> So am I wrong in assuming that PUT and other non-GET verbs should
> support application/x-www-form-urlencoded, or is this something that
> should be made to behave more consistently?

I don't know that there's any major disadvantage to having Camping
attempt to parse the request body if a) the request was made using a
non-GET verb and b) the MIME type for the request was set to
'application/x-www-form-urlencoded'. (Of course, it should fail
gracefully if this parsing fails, as a poorly-implemented HTTP client
might, for example, mis-match the MIME type and payload serialization
format.)
_______________________________________________
Camping-list mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/camping-list

Reply via email to