提交 88c5a4be 编写于 作者: H HexToString

fix bug

上级 af8a54ea
......@@ -457,8 +457,8 @@ class GeneralClient(object):
# 当数据区长度大于512字节时才压缩.
try:
if self.try_request_gzip and self.total_data_number > 512:
origin_data = postData
if http_proto:
if self.http_proto:
postData = gzip.compress(postData)
else:
postData = gzip.compress(bytes(postData, 'utf-8'))
......@@ -469,7 +469,6 @@ class GeneralClient(object):
except:
print("compress error, we will use the no-compress data")
headers.pop("Content-Encoding", "nokey")
postData = origin_data
# requests支持自动识别解压
try:
result = self.requests_session.post(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册