mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 18:54:30 +00:00
fix http parsing utils (#7753)
This commit is contained in:
parent
f1335362cf
commit
c8ac61f117
1 changed files with 2 additions and 1 deletions
|
@ -41,7 +41,8 @@ async def _read_request_body(request: Optional[Request]) -> Dict:
|
||||||
# Return empty dict if body is empty or None
|
# Return empty dict if body is empty or None
|
||||||
if not body:
|
if not body:
|
||||||
parsed_body = {}
|
parsed_body = {}
|
||||||
parsed_body = orjson.loads(body)
|
else:
|
||||||
|
parsed_body = orjson.loads(body)
|
||||||
|
|
||||||
# Cache the parsed result
|
# Cache the parsed result
|
||||||
_safe_set_request_parsed_body(request=request, parsed_body=parsed_body)
|
_safe_set_request_parsed_body(request=request, parsed_body=parsed_body)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue