[wp-hackers] HTTP Request API edge case

Peter Westwood peter.westwood at ftwr.co.uk
Thu Jul 16 08:58:59 UTC 2009

> On Thu, Jul 16, 2009 at 9:44 AM, Peter
> Westwood<peter.westwood at ftwr.co.uk> wrote:
>>> On 7/15/2009 12:01 PM, John Blackbourn wrote:
>>>> Just a quick heads up for anyone who may be using the POST method with
>>>> the wp_remote_request() function in WordPress, you must ensure that
>>>> POST is written in uppercase as the cURL transport method will fail
>>>> otherwise (at the switch statement in WP_Http_Curl::request). Other
>>>> transport methods may suffer from this too, I haven't checked.
>>>> Bit of an edge case I know but I thought I would put it out there.
>>> Worth a patch on Trac to strtoupper to protect anyone in the future.
>> Maybe.
>> Technically the method is case-sensitive:
> While I absolutely agree with your reading of the RFC, in this
> situation there's no realistic situation I can think of where someone
> would type "post" and not mean "POST".... unless I'm missing
> something?


I think we need to be careful to upper-case only certain method names.

I believe this is the approach that browsers have taken for XMLHTTPRequest


More information about the wp-hackers mailing list