We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 986610a + 364c777 commit 49bfbedCopy full SHA for 49bfbed
src/Qiniu/Http/Client.php
@@ -83,9 +83,14 @@ private static function sendRequest($request)
83
CURLOPT_HEADER => true,
84
CURLOPT_NOBODY => false,
85
CURLOPT_CUSTOMREQUEST => $request->method,
86
- CURLOPT_FOLLOWLOCATION => 1,
87
CURLOPT_URL => $request->url
88
);
+
89
+ // Handle open_basedir & safe mode
90
+ if (!ini_get('safe_mode') && !ini_get('open_basedir'))
91
+ {
92
+ $options[CURLOPT_FOLLOWLOCATION] = true;
93
+ }
94
95
if (!empty($request->headers)) {
96
$headers = array();
0 commit comments