[wp-trac] [WordPress Trac] #37503: Requests doesn't pass through custom methods in cURL transport
WordPress Trac
noreply at wordpress.org
Tue Aug 2 09:33:16 UTC 2016
#37503: Requests doesn't pass through custom methods in cURL transport
--------------------------------+------------------------
Reporter: Ipstenu | Owner: dd32
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.6
Component: HTTP API | Version: trunk
Severity: normal | Resolution:
Keywords: upstream has-patch | Focuses:
--------------------------------+------------------------
Changes (by ocean90):
* owner: rmccue => dd32
Comment:
[attachment:37503.2.patch] removes the case for PATCH, PUT, DELETE and
OPTIONS since it's the same as the default case.
I'm unsure if we need a check for the `$data` value here. It was
previously wrapped with a `is_null()` condition. From the API
documentation:
> If CURLOPT_POSTFIELDS is explicitly set to NULL then libcurl will get
the POST data from the read callback. If you want to send a zero-byte POST
set CURLOPT_POSTFIELDS to an empty string, or set CURLOPT_POST to 1 and
CURLOPT_POSTFIELDSIZE to 0.
> — https://curl.haxx.se/libcurl/c/CURLOPT_POSTFIELDS.html
PHP source: https://github.com/php/php-
src/blob/f7df40f45a17f23b982f01d4c07ae784d5171414/ext/curl/interface.c#L2769-L2787
@dd32 What do you think about this? Would like to have this for RC2.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37503#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list