WordPress.org

Make WordPress Core

Changeset 11977


Ignore:
Timestamp:
09/26/2009 10:52:42 PM (9 years ago)
Author:
azaozz
Message:

Expose HTTP PUT when supported, props mdawaffe, fixes #10855

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/http.php

    r11937 r11977  
    11221122                $r['method'] = HTTP_METH_HEAD;
    11231123                break;
     1124            case 'PUT':
     1125                $r['method'] =  HTTP_METH_PUT;
     1126                break;
    11241127            case 'GET':
    11251128            default:
     
    13051308            case 'POST':
    13061309                curl_setopt( $handle, CURLOPT_POST, true );
     1310                curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] );
     1311                break;
     1312            case 'PUT':
     1313                curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, 'PUT' );
    13071314                curl_setopt( $handle, CURLOPT_POSTFIELDS, $r['body'] );
    13081315                break;
Note: See TracChangeset for help on using the changeset viewer.