Compare commits
3 Commits
68bf3843ec
...
cfece7593e
Author | SHA1 | Date | |
---|---|---|---|
cfece7593e | |||
51f65f9293 | |||
766912c51d |
@ -216,6 +216,10 @@ class OngekiServlet(BaseServlet):
|
||||
)
|
||||
return Response(zlib.compress(b'{"stat": "0"}'))
|
||||
|
||||
if version < 105:
|
||||
# O.N.G.E.K.I base don't use zlib
|
||||
req_data = json.loads(req_raw)
|
||||
else:
|
||||
try:
|
||||
unzip = zlib.decompress(req_raw)
|
||||
|
||||
@ -251,9 +255,12 @@ class OngekiServlet(BaseServlet):
|
||||
|
||||
self.logger.debug(f"Response {resp}")
|
||||
|
||||
zipped = zlib.compress(json.dumps(resp, ensure_ascii=False).encode("utf-8"))
|
||||
resp_raw = json.dumps(resp, ensure_ascii=False).encode("utf-8")
|
||||
zipped = zlib.compress(resp_raw)
|
||||
|
||||
if not encrtped or version < 120:
|
||||
if version < 105:
|
||||
return Response(resp_raw)
|
||||
return Response(zipped)
|
||||
|
||||
padded = pad(zipped, 16)
|
||||
|
Loading…
Reference in New Issue
Block a user