[wp-hackers] HTTP Request API edge case

Jacob Santos wordpress at santosj.name
Sun Jul 19 18:25:52 UTC 2009


No, there aren't any methods that currently exist that are mixed case or lower case. All existing methods are uppercase. That is not to say that there couldn't be or won't be in the future. It is also to say that most of the time, we should be doing POST, GET, or HEAD. All of the others such as PUT, have no guarantee to be supported on the server we are requesting, and most likely would be blocked from doing a PUT request.

Furthermore, if someone is using a non-standard method, they either know what they are doing, or should not be doing it. Alas, such things should probably be in a header than a method as the server probably won't know what to do with it otherwise. There is a reason DAV requires an extension, is that it is an extension to the HTTP 1.1 standard and not part of it.

So in conclusion, if someone is doing something other than POST, GET, HEAD, or one of the HTTP 1.1, then they are doing it wrong and therefore we can safely uppercase the method.

-- 
Jacob Santos



On Sun, 19 Jul 2009 09:21:54 -0700
Matt Mullenweg <m at mullenweg.com> wrote:

> On 7/16/2009 11:15 PM, Peter Westwood wrote:
> > A I said earlier in the thread the HTTP method argument is
> > case-sensitive so we should not strtoupper every method.
> 
> Are there any methods that are not all uppercase? I can't find any. 
> That's why I thought it might make sense to auto-uppercase.
> 
> -- 
> Matt Mullenweg
> http://ma.tt | http://wordpress.org | http://automattic.com
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers





More information about the wp-hackers mailing list