Merge pull request #4 from ufilesdk-dev/from_pxu_urlencode

UCloud_ListObjects urlencode query
This commit is contained in:
XuSenqi 2022-08-24 17:35:14 +08:00 committed by GitHub
commit fb8cda063c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -336,7 +336,9 @@ function UCloud_ListObjects($bucket, $path_prefix, $marker, $count, $delimiter)
global $UCLOUD_PROXY_SUFFIX;
$host = $bucket . $UCLOUD_PROXY_SUFFIX;
$path = "?listobjects&prefix=" . $path_prefix ."&marker=". $marker . "&max-keys=" . $count ."&delimiter=" .$delimiter;
$query = "listobjects&prefix=" . $path_prefix ."&marker=". $marker . "&max-keys=" . $count ."&delimiter=" .$delimiter;
parse_str($query,$arr);
$path = "?" . http_build_query($arr);
$req = new HTTP_Request('GET', array('host'=>$host, 'path'=>$path), null, $bucket, null, $action_type);
$req->Header['Content-Type'] = 'application/x-www-form-urlencoded';