Skip to content

Commit 468544c

Browse files
committed
修复大于4M的文件hash计算错误的问题
1 parent 2ae5418 commit 468544c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

qiniu/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,11 +119,11 @@ def etag_stream(input_stream):
119119
array = [_sha1(block) for block in _file_iter(input_stream, _BLOCK_SIZE)]
120120
if len(array) == 1:
121121
data = array[0]
122-
prefix = b('\x16')
122+
prefix = b'\x16'
123123
else:
124124
sha1_str = b('').join(array)
125125
data = _sha1(sha1_str)
126-
prefix = b('\x96')
126+
prefix = b'\x96'
127127
return urlsafe_base64_encode(prefix + data)
128128

129129

0 commit comments

Comments
 (0)