WordPress.org

Make WordPress Core

Changeset 29848


Ignore:
Timestamp:
10/08/2014 05:18:22 AM (5 years ago)
Author:
dd32
Message:

Return the correct server response for the 'message' response field from the server.
Previously this would use the generic message corresponding to the response code, which isn't always accurate. Since we're already parsing the headers, we can simply return that directly (This also has the benefit that it's the same code for both Streams and Curl header handling).
Fixes #28919

File:
1 edited

Legend:

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

    r29789 r29848  
    14431443        }
    14441444
    1445         $response = array();
    1446         $response['code'] = curl_getinfo( $handle, CURLINFO_HTTP_CODE );
    1447         $response['message'] = get_status_header_desc($response['code']);
    1448 
    14491445        curl_close( $handle );
    14501446
     
    14551451            'headers' => $theHeaders['headers'],
    14561452            'body' => null,
    1457             'response' => $response,
     1453            'response' => $theHeaders['response'],
    14581454            'cookies' => $theHeaders['cookies'],
    14591455            'filename' => $r['filename']
Note: See TracChangeset for help on using the changeset viewer.