Response::isJson() 实现问题
Closed this issue · 2 comments
71sprite commented
https://github.com/qiniu/php-sdk/blob/master/src/Qiniu/Http/Response.php#L183
此处只要满足 array_key_exists('content-type', $headers)
即返回 true,看起来不太合理
lihsai0 commented
的确不合理,已安排,修复后会关闭此 issue
感谢反馈
anhao commented
{
$headers = array_change_key_case($headers);
return array_key_exists('content-type', $headers) && strpos($headers['content-type'], 'application/json') === 0;
}