WordPress.org

Make WordPress Core

Changeset 8588


Ignore:
Timestamp:
08/08/08 16:28:07 (6 years ago)
Author:
westi
Message:

Ensure fsockopen HTTP requests have Content-length and Content-type headers. See #4779 props DD32.

File:
1 edited

Legend:

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

    r8586 r8588  
    446446        $strHeaders .= strtoupper($r['method']) . ' ' . $requestPath . ' HTTP/' . $r['httpversion'] . "\r\n"; 
    447447        $strHeaders .= 'Host: ' . $arrURL['host'] . "\r\n"; 
     448        if ( ! is_null($body) ) { 
     449            $strHeaders .= 'Content-Type: application/x-www-form-urlencoded; charset=' . get_option('blog_charset') . "\r\n"; 
     450            $strHeaders .= 'Content-Length: ' . strlen($body) . "\r\n"; 
     451        } 
    448452 
    449453        if ( is_array($headers) ) { 
Note: See TracChangeset for help on using the changeset viewer.