[wp-hackers] HTTP Request API edge case

Simon Wheatley simon at sweetinteraction.com
Wed Jul 15 19:05:31 UTC 2009


On Wed, Jul 15, 2009 at 8:01 PM, John
Blackbourn<johnbillion+wp at gmail.com> 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.
>

John is tactfully not mentioning that it's my plugin (unreleased) he
discovered this on. cURL was set to default transport method in WP 2.8
(?) instead of the streams transport method (previously default).
Streams handles a lowercase "post" and cURL doesn't... which is how I
hit that particular bug. Thanks to John for figuring it out.

S


---
Sweet Interaction Ltd is Registered in England/Wales, no. 6610741
Registered office: 7 Malton Av, Manchester, M21 8AT


More information about the wp-hackers mailing list