Make WordPress Core

Ticket #36253: fix_port_in_host_header.diff

File fix_port_in_host_header.diff, 689 bytes (added by bangelov, 9 years ago)
  • wp-includes/class-wp-http-streams.php

     
    6969
    7070                if ( isset( $r['headers']['Host'] ) || isset( $r['headers']['host'] ) ) {
    7171                        if ( isset( $r['headers']['Host'] ) )
    72                                 $arrURL['host'] = $r['headers']['Host'];
     72                                $arrURL['host'] = array_shift( explode( ':', $r['headers']['Host'] ) );
    7373                        else
    74                                 $arrURL['host'] = $r['headers']['host'];
     74                                $arrURL['host'] = array_shift( explode( ':', $r['headers']['host'] ) );
    7575                        unset( $r['headers']['Host'], $r['headers']['host'] );
    7676                }
    7777