Ticket #18589: 18589.diff

File 18589.diff, 668 bytes (added by jbrinley, 21 months ago)

Patch to add DELETE, OPTIONS, and TRACE to WP_Http_Curl

Line 
1Index: wp-includes/class-http.php
2===================================================================
3--- wp-includes/class-http.php  (revision 18542)
4+++ wp-includes/class-http.php  (revision )
5@@ -1055,6 +1055,15 @@
6                                curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'PUT' );
7                                curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] );
8                                break;
9+                       case 'DELETE':
10+                               curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'DELETE' );
11+                               break;
12+                       case 'OPTIONS':
13+                               curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'OPTIONS' );
14+                               break;
15+                       case 'TRACE':
16+                               curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'TRACE' );
17+                               break;
18                }
19 
20                if ( true === $r['blocking'] )