Skip to content

Commit 46600f2

Browse files
author
libertyzhu
committed
增加SDK重试标记请求头x-cos-sdk-retry
1 parent a475250 commit 46600f2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

qcloud_cos/cos_client.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,7 @@ def send_request(self, method, url, bucket=None, timeout=30, cos_request=True, c
392392
try:
393393
if j != 0:
394394
if client_can_retry(file_position, **kwargs):
395+
kwargs['headers']['x-cos-sdk-retry'] = 'true' # SDK重试标记
395396
time.sleep(j)
396397
else:
397398
break

0 commit comments

Comments
 (0)