Gargi Jaiswal created HDDS-15604:
------------------------------------
Summary: Fix PutObject failure when Transfer-Encoding is chunked
and Content-Length is absent
Key: HDDS-15604
URL: https://issues.apache.org/jira/browse/HDDS-15604
Project: Apache Ozone
Issue Type: Sub-task
Components: S3
Reporter: Gargi Jaiswal
Assignee: Gargi Jaiswal
s3-tests
{color:#00875a}{{test_object_write_with_chunked_transfer_encoding}}{color}
fails with \{*}{{XAmzContentSHA256Mismatch}}{*}.
When the client sends {{*Transfer-Encoding:* chunked}} without
{{{}Content-Length{}}}, the S3 Gateway treat the body length as {{{}0{}}}, read
no bytes, and rejected the request because the computed SHA256 did not match
{{{}x-amz-content-sha256{}}}.
Root cause:
{{*ObjectEndpoint*}} defaulted missing *{{Content-Length}} to {{{}0{}}}.
{{S3ObjectWriteGuard.copyFrom()}}* only reads while
{color:#172b4d}{{writtenLength < expectedLength}}{color}, so no payload was
consumed.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]