WordPress.org

Make WordPress Core

Changeset 11236


Ignore:
Timestamp:
05/07/2009 09:18:20 PM (10 years ago)
Author:
westi
Message:

Pass just the headers array to should_decode. Fixes #9754 props willnorris.

File:
1 edited

Legend:

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

    r11154 r11236  
    722722            $process['body'] = WP_Http::chunkTransferDecode($process['body']);
    723723
    724         if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($arrHeaders) )
     724        if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($arrHeaders['headers']) )
    725725            $process['body'] = WP_Http_Encoding::decompress( $process['body'] );
    726726
     
    836836            $strResponse = WP_Http::chunkTransferDecode($strResponse);
    837837
    838         if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($processedHeaders) )
     838        if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($processedHeaders['headers']) )
    839839            $strResponse = WP_Http_Encoding::decompress( $strResponse );
    840840
     
    10041004            $strResponse = WP_Http::chunkTransferDecode($strResponse);
    10051005
    1006         if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($processedHeaders) )
     1006        if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($processedHeaders['headers']) )
    10071007            $strResponse = WP_Http_Encoding::decompress( $strResponse );
    10081008
     
    11601160        }
    11611161
    1162         if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($theHeaders) )
     1162        if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($theHeaders['headers']) )
    11631163            $theBody = http_inflate( $theBody );
    11641164
     
    13431343        curl_close( $handle );
    13441344
    1345         if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($theHeaders) )
     1345        if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($theHeaders['headers']) )
    13461346            $theBody = WP_Http_Encoding::decompress( $theBody );
    13471347
Note: See TracChangeset for help on using the changeset viewer.