WordPress.org

Make WordPress Core

Ticket #11555: 11555.diff

File 11555.diff, 689 bytes (added by dd32, 8 years ago)
  • wp-includes/http.php

     
    424424
    425425                $response = array('code' => 0, 'message' => '');
    426426
     427                // If a redirection has taken place, The Headers for each page request may have been passed.
     428                // In this case, Determine the final HTTP header and parse from there.
     429                for ( $i = count($headers)-1; $i >= 0; $i-- ) {
     430                        if ( false === strpos($headers[$i], ':') ) {
     431                                $headers = array_splice($headers, $i);
     432                                break;
     433                        }
     434                }
     435
    427436                $cookies = array();
    428437                $newheaders = array();
    429438                foreach ( $headers as $tempheader ) {