Make WordPress Core

Ticket #24182: 24182.diff

File 24182.diff, 794 bytes (added by dd32, 12 years ago)
  • wp-includes/class-http.php

     
    659659                        }
    660660                }
    661661
     662                if ( isset( $r['headers']['Host'] ) || isset( $r['headers']['host'] ) ) {
     663                        if ( isset( $r['headers']['Host'] ) )
     664                                $arrURL['host'] = $r['headers']['Host'];
     665                        else
     666                                $arrURL['host'] = $r['headers']['host'];
     667                        unset( $r['headers']['Host'], $r['headers']['host'] );
     668                }
     669
    662670                //fsockopen has issues with 'localhost' with IPv6 with certain versions of PHP, It attempts to connect to ::1,
    663671                // which fails when the server is not set up for it. For compatibility, always connect to the IPv4 address.
    664672                if ( 'localhost' == strtolower($fsockopen_host) )