Update http.php

优化返回值兼容Etag
This commit is contained in:
delex.xie 2020-03-27 19:49:42 +08:00 committed by GitHub
parent 14093f24bf
commit 2af55e185a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -253,7 +253,11 @@ function UCloud_Client_Ret($resp)
}
$etag = UCloud_Header_Get($resp->Header, 'ETag');
if ($etag != '') $data['ETag'] = $etag;
if ($etag != ''){
$data['ETag'] = $etag;
}else{
$data['ETag'] = UCloud_Header_Get($resp->Header, 'Etag');
}
if (floor($code/100) == 2) {
return array($data, null);
}