This commit is contained in:
xyj 2024-01-24 16:37:54 +08:00
parent 8e27d64b18
commit 8c43382caf
1 changed files with 2 additions and 3 deletions

View File

@ -118,12 +118,11 @@ async def process_data(request: Request):
data = json.loads(data) data = json.loads(data)
payload = data["payload"] payload = data["payload"]
receive_len = len(payload) receive_len = len(payload)
print(receive_len)
payload = json.loads(payload) payload = json.loads(payload)
send_len = payload["l"] send_len = payload["l"]
if receive_len != send_len: if receive_len != send_len:
print("校验错误") print("校验错误,收到的消息长度:", receive_len)
return 301 return BaseResponse(code=301, msg="data valid error")
m = payload["m"] m = payload["m"]
v = payload["v"] v = payload["v"]
cid = v[0] cid = v[0]