Changeset 10283
- Timestamp:
- 12/31/2008 03:02:53 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/http.php
r10282 r10283 413 413 * 414 414 * @param string $body Body content 415 * @return bool|string|WP_Error False if not chunked encoded. WP_Error on failure. Chunked decoded body on success.415 * @return string Chunked decoded body on success or raw body on failure. 416 416 */ 417 417 function chunkTransferDecode($body) { … … 424 424 //$parsedHeaders = array(); Unsupported 425 425 426 $done = false; 427 428 do { 426 while ( true ) { 429 427 $hasChunk = (bool) preg_match( '/^([0-9a-f]+)(\s|\n)+/mi', $body, $match ); 430 428 431 429 if ( $hasChunk ) { 432 if ( empty( $match[1]) ) {430 if ( empty( $match[1] ) ) 433 431 return $body; 434 }435 432 436 433 $length = hexdec( $match[1] ); … … 442 439 $body = ltrim(str_replace(array($match[0], $strBody), '', $body), "\n"); 443 440 444 if( "0" == trim($body) ) { 445 $done = true; 441 if( "0" == trim($body) ) 446 442 return $parsedBody; // Ignore footer headers. 447 break;448 }449 443 } else { 450 444 return $body; 451 445 } 452 } while ( true === $done );446 } 453 447 } 454 448 }
Note: See TracChangeset
for help on using the changeset viewer.