From 8eaa8788b9d58c8a8f462fa89de5103d7eb492a8 Mon Sep 17 00:00:00 2001 From: Sky O Date: Thu, 28 Mar 2024 19:50:36 +0000 Subject: [PATCH] Fix incorrect instantiation of MultipartParser --- moto/moto_proxy/utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moto/moto_proxy/utils.py b/moto/moto_proxy/utils.py index bbdb055af..bcd7fe299 100644 --- a/moto/moto_proxy/utils.py +++ b/moto/moto_proxy/utils.py @@ -8,8 +8,8 @@ def get_body_from_form_data( body: bytes, boundary: str ) -> Tuple[Optional[bytes], Dict[str, str]]: body_stream = io.BytesIO(body) - parser = multipart.MultipartParser(body_stream, boundary=boundary) - + parser = multipart.MultipartParser(boundary=boundary) + parser.write(body_stream) data = None headers: Dict[str, str] = {} for prt in parser.parts():