Skip to content

Commit

Permalink
Properly handle CopyObject with content length 0
Browse files Browse the repository at this point in the history
This fixes getmoto#8592
  • Loading branch information
jeking3 committed Feb 17, 2025
1 parent c2a0d9c commit 336f6e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions moto/s3/responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,9 @@ def setup_class(self, request: Any, full_url: str, headers: Any) -> None: # typ
if (
not self.body
and request.headers.get("Content-Encoding", "") == "aws-chunked"
and hasattr(request, "input_stream")
and hasattr(request, "stream")
):
self.body = request.input_stream.getvalue()
self.body = request.stream.read()
if (
self.request.headers.get("x-amz-content-sha256")
== "STREAMING-UNSIGNED-PAYLOAD-TRAILER"
Expand Down

0 comments on commit 336f6e6

Please sign in to comment.