mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-09 18:08:09 +01:00
Support custom HTTP Methods in WP_Http_Curl. Brings it in line with the other HTTP transports of respecting the requested method. Props zx2c4. Fixes #18589
git-svn-id: http://svn.automattic.com/wordpress/trunk@19696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
34b7010df8
commit
3abb558ae8
@ -1052,6 +1052,9 @@ class WP_Http_Curl {
|
|||||||
curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'PUT' );
|
curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'PUT' );
|
||||||
curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] );
|
curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] );
|
||||||
break;
|
break;
|
||||||
|
default:
|
||||||
|
curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, $r['method'] );
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( true === $r['blocking'] )
|
if ( true === $r['blocking'] )
|
||||||
|
Loading…
Reference in New Issue
Block a user