WordPress.org

Make WordPress Core

Ticket #18589: wordpress-curl-http-custom-method-fix.patch

File wordpress-curl-http-custom-method-fix.patch, 522 bytes (added by zx2c4, 7 years ago)

A much better more generic solution to support all sorts of methods.

  • wp-includes/class-http.php

    diff -rupN old/wp-includes/class-http.php new/wp-includes/class-http.php
    old new class WP_Http_Curl { 
    10551055                                curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'PUT' );
    10561056                                curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] );
    10571057                                break;
     1058                        default:
     1059                                curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, $r['method'] );
     1060                                break;
    10581061                }
    10591062
    10601063                if ( true === $r['blocking'] )