[wp-trac] [WordPress Trac] #18589: class WP_Http_Curl missing support for DELETE method
WordPress Trac
wp-trac at lists.automattic.com
Sun Sep 4 20:32:37 UTC 2011
#18589: class WP_Http_Curl missing support for DELETE method
-------------------------+-----------------------------
Reporter: jbrinley | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTTP | Version:
Severity: normal | Keywords:
-------------------------+-----------------------------
WP_Http_Curl ignores any request methods other than HEAD, POST, and PUT,
treating anything else as GET.
I'm particularly interested in the DELETE method, although a reasonable
case could be made for also handling OPTIONS and TRACE.
The switch statement in WP_Http_Curl::request() just needs a new case for
each:
{{{
case 'DELETE':
curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'DELETE' );
break;
case 'OPTIONS':
curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'OPTIONS' );
break;
case 'TRACE':
curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'TRACE' );
break;
}}}
--
Ticket URL: <http://core.trac.wordpress.org/ticket/18589>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list