WordPress.org

Make WordPress Core

Changeset 12642


Ignore:
Timestamp:
01/07/10 10:26:33 (4 years ago)
Author:
azaozz
Message:

When decompressing try to raw-inflate first, props dd32, fixes #11600

File:
1 edited

Legend:

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

    r12472 r12642  
    18171817     */ 
    18181818    function decompress( $compressed, $length = null ) { 
    1819         $decompressed = WP_Http_Encoding::compatible_gzinflate( $compressed ); 
    1820  
    1821         if ( false !== $decompressed ) 
     1819 
     1820        if ( false !== ( $decompressed = @gzinflate( $compressed ) ) ) 
    18221821            return $decompressed; 
    18231822 
    1824         $decompressed = gzuncompress( $compressed ); 
    1825  
    1826         if ( false !== $decompressed ) 
     1823        if ( false !== ( $decompressed = WP_Http_Encoding::compatible_gzinflate( $compressed ) ) ) 
    18271824            return $decompressed; 
    18281825 
     1826        if ( false !== ( $decompressed = @gzuncompress( $compressed ) ) ) 
     1827            return $decompressed; 
     1828 
    18291829        if ( function_exists('gzdecode') ) { 
    1830             $decompressed = gzdecode( $compressed ); 
     1830            $decompressed = @gzdecode( $compressed ); 
    18311831 
    18321832            if ( false !== $decompressed ) 
     
    19171917            if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) ) 
    19181918                return true; 
    1919         } else if( is_string( $headers ) ) { 
     1919        } else if ( is_string( $headers ) ) { 
    19201920            return ( stripos($headers, 'content-encoding:') !== false ); 
    19211921        } 
Note: See TracChangeset for help on using the changeset viewer.