From 5e6efbd092a03cbe1827ceec4b830c65ca3a1bc2 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Tue, 9 Jan 2024 19:10:24 -0500 Subject: [PATCH] wacca: fix network BAD --- titles/wacca/index.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/titles/wacca/index.py b/titles/wacca/index.py index e1428fa..9a87d7c 100644 --- a/titles/wacca/index.py +++ b/titles/wacca/index.py @@ -25,7 +25,6 @@ from .base import WaccaBase from .handlers.base import BaseResponse, BaseRequest from .handlers.helpers import Version - class WaccaServlet(BaseServlet): def __init__(self, core_cfg: CoreConfig, cfg_dir: str) -> None: self.core_cfg = core_cfg @@ -97,7 +96,9 @@ class WaccaServlet(BaseServlet): async def render_POST(self, request: Request) -> bytes: def end(resp: Dict) -> bytes: hash = md5(json.dumps(resp, ensure_ascii=False).encode()).digest() - return JSONResponse(resp, headers={"X-Wacca-Hash": hash.hex()}) + j_Resp = Response(json.dumps(resp, ensure_ascii=False)) + j_Resp.raw_headers.append((b"X-Wacca-Hash", hash.hex().encode())) + return j_Resp api = request.path_params.get('api', '') branch = request.path_params.get('branch', '')