fix: encoding bugs found in http api

This commit is contained in:
mrmrfan 2018-11-27 17:38:54 +08:00
parent 0317606791
commit 27c9162c97
1 changed files with 2 additions and 0 deletions

View File

@ -31,6 +31,8 @@ class GstoreConnector:
ret += c
elif ((ord(c)>=97) and (ord(c)<=122)):
ret += c
elif (ord(c)>=256):
ret += chr(ord(c))
elif ((ord(c)!=10) and (ord(c)!=11) and (ord(c)!=13)):
ret += "{}{:X}".format("%", ord(c))
return ret