git-svn-id: https://develop.svn.wordpress.org/trunk@8534 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6a5662b4a5
commit
ab2239137f
@ -862,9 +862,11 @@ class WP_Http_Curl {
|
|||||||
curl_setopt( $handle, CURLOPT_USERAGENT, $r['user-agent'] );
|
curl_setopt( $handle, CURLOPT_USERAGENT, $r['user-agent'] );
|
||||||
curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 1 );
|
curl_setopt( $handle, CURLOPT_CONNECTTIMEOUT, 1 );
|
||||||
curl_setopt( $handle, CURLOPT_TIMEOUT, $r['timeout'] );
|
curl_setopt( $handle, CURLOPT_TIMEOUT, $r['timeout'] );
|
||||||
curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true );
|
|
||||||
curl_setopt( $handle, CURLOPT_MAXREDIRS, $r['redirection'] );
|
curl_setopt( $handle, CURLOPT_MAXREDIRS, $r['redirection'] );
|
||||||
|
|
||||||
|
if ( !ini_get('safe_mode') && !ini_get('open_basedir') )
|
||||||
|
curl_setopt( $handle, CURLOPT_FOLLOWLOCATION, true );
|
||||||
|
|
||||||
if( ! is_null($headers) )
|
if( ! is_null($headers) )
|
||||||
curl_setopt( $handle, CURLOPT_HTTPHEADER, $headers );
|
curl_setopt( $handle, CURLOPT_HTTPHEADER, $headers );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user