Skip to content

Commit d098889

Browse files
authored
Merge pull request #256 from ekuwang/master
change headers to lowercase to make headers case-insensitive
2 parents f8ab359 + 28997fd commit d098889

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Qiniu/Http/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public static function sendRequest($request)
8383
CURLOPT_HEADER => true,
8484
CURLOPT_NOBODY => false,
8585
CURLOPT_CUSTOMREQUEST => $request->method,
86-
CURLOPT_URL => $request->url
86+
CURLOPT_URL => $request->url,
8787
);
8888

8989
// Handle open_basedir & safe mode

src/Qiniu/Http/Response.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ public function json()
130130

131131
private static function bodyJson($body)
132132
{
133-
return \Qiniu\json_decode((string)$body, true, 512);
133+
return \Qiniu\json_decode((string) $body, true, 512);
134134
}
135135

136136
public function xVia()
@@ -170,7 +170,7 @@ public function needRetry()
170170

171171
private static function isJson($headers)
172172
{
173-
return array_key_exists('Content-Type', $headers) &&
173+
return array_key_exists('content-type', $headers) &&
174174
strpos($headers['Content-Type'], 'application/json') === 0;
175175
}
176176
}

0 commit comments

Comments
 (0)