mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-02 05:31:25 +01:00
Fix Typo in r12747, Move cURL Redirection check higher. See #11305
git-svn-id: http://svn.automattic.com/wordpress/trunk@12749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
5c739a4b9c
commit
45b2389358
@ -1416,10 +1416,7 @@ class WP_Http_Curl {
|
|||||||
|
|
||||||
curl_close( $handle );
|
curl_close( $handle );
|
||||||
|
|
||||||
if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($theHeaders['headers']) )
|
// See #11305 - When running under safe mode, redirection is disabled above. Handle it manually.
|
||||||
$theBody = WP_Http_Encoding::decompress( $theBody );
|
|
||||||
|
|
||||||
// See #11605 - When running under safe mode, redirection is disabled above. Handle it manually.
|
|
||||||
if ( !empty($theHeaders['headers']['location']) && (ini_get('safe_mode') || ini_get('open_basedir')) ) {
|
if ( !empty($theHeaders['headers']['location']) && (ini_get('safe_mode') || ini_get('open_basedir')) ) {
|
||||||
if ( $r['redirection']-- > 0 ) {
|
if ( $r['redirection']-- > 0 ) {
|
||||||
return $this->request($theHeaders['headers']['location'], $r);
|
return $this->request($theHeaders['headers']['location'], $r);
|
||||||
@ -1428,6 +1425,9 @@ class WP_Http_Curl {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( true === $r['decompress'] && true === WP_Http_Encoding::should_decode($theHeaders['headers']) )
|
||||||
|
$theBody = WP_Http_Encoding::decompress( $theBody );
|
||||||
|
|
||||||
return array('headers' => $theHeaders['headers'], 'body' => $theBody, 'response' => $response, 'cookies' => $theHeaders['cookies']);
|
return array('headers' => $theHeaders['headers'], 'body' => $theBody, 'response' => $response, 'cookies' => $theHeaders['cookies']);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user