From da627bdb9a088bd9f1a2e9bed9ecf326ad3aff69 Mon Sep 17 00:00:00 2001 From: Kraiem Taha Yassine Date: Mon, 10 Jul 2023 16:01:28 +0100 Subject: [PATCH] Api v1.14.0 (#1398) * fix(chalice): cast note's session_id to string * fix(chalice): cast all session_id to string * fix(chalice): fixed content-length after cast all session_id to string --- api/or_dependencies.py | 5 +++-- ee/api/or_dependencies.py | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/api/or_dependencies.py b/api/or_dependencies.py index 77bcb9c44..31b95574f 100644 --- a/api/or_dependencies.py +++ b/api/or_dependencies.py @@ -34,8 +34,9 @@ class ORRoute(APIRoute): if isinstance(response, JSONResponse): response: JSONResponse = response body = json.loads(response.body.decode('utf8')) - body=helper.cast_session_id_to_string(body) - response = JSONResponse(content=body, status_code=response.status_code, headers=response.headers, + body = helper.cast_session_id_to_string(body) + response = JSONResponse(content=body, status_code=response.status_code, + headers={k: v for k, v in response.headers.items() if k != "content-length"}, media_type=response.media_type, background=response.background) if response.status_code == 200 \ and body is not None and isinstance(body, dict) \ diff --git a/ee/api/or_dependencies.py b/ee/api/or_dependencies.py index 0d0ea342a..2671948d8 100644 --- a/ee/api/or_dependencies.py +++ b/ee/api/or_dependencies.py @@ -39,7 +39,8 @@ class ORRoute(APIRoute): response: JSONResponse = response body = json.loads(response.body.decode('utf8')) body = helper.cast_session_id_to_string(body) - response = JSONResponse(content=body, status_code=response.status_code, headers=response.headers, + response = JSONResponse(content=body, status_code=response.status_code, + headers={k: v for k, v in response.headers.items() if k != "content-length"}, media_type=response.media_type, background=response.background) if response.status_code == 200 \ and body is not None and isinstance(body, dict) \