From c8ac61f117f9fe06937b16a417b89e516f415dc3 Mon Sep 17 00:00:00 2001 From: Ishaan Jaff Date: Mon, 13 Jan 2025 19:58:26 -0800 Subject: [PATCH] fix http parsing utils (#7753) --- litellm/proxy/common_utils/http_parsing_utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/litellm/proxy/common_utils/http_parsing_utils.py b/litellm/proxy/common_utils/http_parsing_utils.py index 83eb9f74fd9..07bd037fe66 100644 --- a/litellm/proxy/common_utils/http_parsing_utils.py +++ b/litellm/proxy/common_utils/http_parsing_utils.py @@ -41,7 +41,8 @@ async def _read_request_body(request: Optional[Request]) -> Dict: # Return empty dict if body is empty or None if not body: parsed_body = {} - parsed_body = orjson.loads(body) + else: + parsed_body = orjson.loads(body) # Cache the parsed result _safe_set_request_parsed_body(request=request, parsed_body=parsed_body)