WordPress.org

Make WordPress Core

Ticket #7770: 7770.diff

File 7770.diff, 828 bytes (added by DD32, 6 years ago)
  • wp-includes/http.php

     
    356356         * @static 
    357357         * 
    358358         * @param string $body Body content 
    359          * @return bool|string|WP_Error False if not chunked encoded. WP_Error on failure. Chunked decoded body on success. 
     359         * @return string|WP_Error WP_Error on failure. body returned as-is if not chunked data. Chunked decoded body on success. 
    360360         */ 
    361361        function chunkTransferDecode($body) { 
    362362                $body = str_replace(array("\r\n", "\r"), "\n", $body); 
    363363                // The body is not chunked encoding or is malformed. 
    364364                if ( ! preg_match( '/^[0-9a-f]+(\s|\n)+/mi', trim($body) ) ) 
    365                         return false; 
     365                        return $body; 
    366366 
    367367                $parsedBody = ''; 
    368368                //$parsedHeaders = array(); Unsupported