Skip to content

Commit 33ceaa0

Browse files
authored
Merge pull request #350 from songfei9315/patch-4
Update auth.py
2 parents 2793d1a + ffd2a3c commit 33ceaa0

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

qiniu/auth.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,8 +264,10 @@ def token_of_request(
264264
data += "\n"
265265

266266
if content_type and content_type != "application/octet-stream" and body:
267-
# data += body.decode(encoding='UTF-8')
268-
data += body
267+
if isinstance(body,bytes):
268+
data += body.decode(encoding='UTF-8')
269+
else:
270+
data += body
269271
return '{0}:{1}'.format(self.__access_key, self.__token(data))
270272

271273
def qiniu_headers(self, headers):

0 commit comments

Comments
 (0)