Make WordPress Core


Ignore:
Timestamp:
05/26/2006 05:25:20 PM (18 years ago)
Author:
ryan
Message:

Enclosure redirect fix from aegrumet. fixes #2551

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/wp-includes/functions.php

    r3771 r3792  
    10921092    }
    10931093
    1094     $code = preg_replace('/.*?(\d{3}).*/i', '$1', $response);
    1095    
    1096     $headers['status_code'] = $code;
    1097    
    1098     if ( '302' == $code || '301' == $code )
    1099         return wp_get_http_headers( $url, ++$red );
    1100 
    11011094    preg_match('/.*([0-9]{3}).*/', $response, $return);
    11021095    $headers['response'] = $return[1]; // HTTP response code eg 204, 200, 404
     1096
     1097    $code = $headers['response'];
     1098    if ( ('302' == $code || '301' == $code) && isset($headers['location']) )
     1099        return wp_get_http_headers( $headers['location'], ++$red );
     1100
    11031101    return $headers;
    11041102}
Note: See TracChangeset for help on using the changeset viewer.