Make WordPress Core

Changeset 24845


Ignore:
Timestamp:
07/29/2013 01:47:01 AM (13 years ago)
Author:
dd32
Message:

WP_HTTP: Fsockopen: Respect a specified Host header in the Fsockopen WP_HTTP transport. Fixes #24182

File:
1 edited

Legend:

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

    r24843 r24845  
    692692                                $arrURL['port'] = 80;
    693693                        }
     694                }
     695
     696                if ( isset( $r['headers']['Host'] ) || isset( $r['headers']['host'] ) ) {
     697                        if ( isset( $r['headers']['Host'] ) )
     698                                $arrURL['host'] = $r['headers']['Host'];
     699                        else
     700                                $arrURL['host'] = $r['headers']['host'];
     701                        unset( $r['headers']['Host'], $r['headers']['host'] );
    694702                }
    695703
Note: See TracChangeset for help on using the changeset viewer.