Skip to content

HDDS-15179. [S3 Compatibility] Support Chunked Transfer without Content Length Set#10196

Open
peterxcli wants to merge 1 commit intoapache:masterfrom
peterxcli:fix/s3-chunked-transfer-without-content-length
Open

HDDS-15179. [S3 Compatibility] Support Chunked Transfer without Content Length Set#10196
peterxcli wants to merge 1 commit intoapache:masterfrom
peterxcli:fix/s3-chunked-transfer-without-content-length

Conversation

@peterxcli
Copy link
Copy Markdown
Member

What changes were proposed in this pull request?

Currently chunked transfer would fail if we don't specify content length

def _ev_add_te_header(request, **kwargs):
    request.headers.add_header('Transfer-Encoding', 'chunked')

def test_object_write_with_chunked_transfer_encoding():
    bucket_name = get_new_bucket()
    client = get_client()

    client.meta.events.register_first('before-sign.*.*', _ev_add_te_header)
    response = client.put_object(Bucket=bucket_name, Key='foo', Body='bar')

    assert response['ResponseMetadata']['HTTPStatusCode'] == 200

with the following error:

botocore.exceptions.ClientError: An error occurred (XAmzContentSHA256Mismatch) when calling the PutObject operation: The provided 'x-amz-content-sha256' header does not match the computed hash.

https://github.com/ceph/s3-tests/blob/fb8b73092bb1dd8db829f1205a9e52e73bf9a232/s3tests/functional/test_s3.py#L1589-L1599

What is the link to the Apache JIRA

https://issues.apache.org/jira/browse/HDDS-15179

How was this patch tested?

(Please explain how this patch was tested. Ex: unit tests, manual tests, workflow run on the fork git repo.)
(If this patch involves UI changes, please attach a screenshot; otherwise, remove this.)

…quests

Signed-off-by: peterxcli <peterxcli@gmail.com>
@peterxcli peterxcli requested review from ChenSammi and adoroszlai and removed request for adoroszlai May 5, 2026 20:41
@peterxcli
Copy link
Copy Markdown
Member Author

I notice the jira ticket should be as a subtask under https://issues.apache.org/jira/browse/HDDS-8423, is there any way to fix it? I couldn't found the move option.

@peterxcli peterxcli self-assigned this May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant