$response = array
( 'headers' =>
$processed_headers['headers'
],
// Not yet processed.
'body' => null,
'response' =>
$processed_headers['response'
],
'cookies' =>
$processed_headers['cookies'
],
'filename' =>
$parsed_args['filename'
],
);
// Handle redirects.
$redirect_response = WP_Http::
handle_redirects( $url,
$parsed_args,
$response );
if ( false !==
$redirect_response ) { return $redirect_response;
} // If the body was chunk encoded, then decode it.
if ( !
empty( $processed_response['body'
] ) &&
isset( $processed_headers['headers'
]['transfer-encoding'
] ) && 'chunked' ===
$processed_headers['headers'
]['transfer-encoding'
] ) { $processed_response['body'
] = WP_Http::
chunkTransferDecode( $processed_response['body'
] );
}