LogRequestWithBody breaks S3 CopyObject #1632
Labels
bug
This issue is a bug.
response-requested
Waiting on additional info and feedback. Will move to "closing-soon" in 7 days.
Documentation
Describe the bug
Enabling
LogRequestWithBody
client log mode breaks S3CopyObject
functionality with S3 returning501 Not Implemented
. UsingLogRequest
instead or just removing logging restoresCopyObject
functionality.Expected behavior
The object/file should be copied successfully with a HTTP 200 response and
CopyObject
should return no error.These are the expected request/response logs.
Request
Response
Current behavior
The object/file is not copied and
CopyObject
returns the following errorRequest
Response
Steps to Reproduce
s3_log_copyobject_bug.go
Possible Solution
The current hypothesis is that when
LogRequestWithBody
reads the request body, it corrupts its state in the case of empty/no bodyCopyObject
operation. The returned error is a bit strange as it refers to aTransfer-Encoding
header, which doesn't even seem to be set in the request itself? Perhaps the SDK erroneously sends a non-empty body for which S3 expects that header to be set.AWS Go SDK version used
v1.13.0
Compiler and Version used
go version go1.17.5 windows/amd64
Operating System and version
Windows 10 Version 20H2
The text was updated successfully, but these errors were encountered: