Skip to content

Commit c37b7b2

Browse files
authored
fix copy source url encode
1 parent 6c43f59 commit c37b7b2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

qcloud_cos/cos_client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3107,7 +3107,7 @@ def _inner_head_object(self, CopySource):
31073107
params = {}
31083108
if versionid != '':
31093109
params['versionId'] = versionid
3110-
url = self._conf.uri(bucket=bucket, path=path, endpoint=endpoint)
3110+
url = u"{scheme}://{bucket}.{endpoint}/{path}".format(scheme=self._conf._scheme, bucket=bucket, endpoint=endpoint, path=quote(to_bytes(path), '/-_.~'))
31113111
rt = self.send_request(
31123112
method='HEAD',
31133113
url=url,

0 commit comments

Comments
 (0)