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.
1 parent 73d68e5 commit 9ccdeadCopy full SHA for 9ccdead
src/Qiniu/Http/Client.php
@@ -85,18 +85,19 @@ private static function sendRequest($request)
85
CURLOPT_CUSTOMREQUEST => $request->method,
86
CURLOPT_URL => $request->url
87
);
88
+
89
if (!empty($request->headers)) {
90
$headers = array();
91
foreach ($request->headers as $key => $val) {
92
array_push($headers, "$key: $val");
93
}
94
$options[CURLOPT_HTTPHEADER] = $headers;
95
96
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
97
98
if (!empty($request->body)) {
99
$options[CURLOPT_POSTFIELDS] = $request->body;
100
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
101
curl_setopt_array($ch, $options);
102
$result = curl_exec($ch);
103
$t2 = microtime(true);
0 commit comments