Skip to content

fix: ignore Expect header in S3 REST signer payload - #3526

Closed
GayathriSrividya wants to merge 1 commit into
apache:mainfrom
GayathriSrividya:fix/issue-3291-s3-rest-signer-expect-header
Closed

fix: ignore Expect header in S3 REST signer payload#3526
GayathriSrividya wants to merge 1 commit into
apache:mainfrom
GayathriSrividya:fix/issue-3291-s3-rest-signer-expect-header

Conversation

@GayathriSrividya

@GayathriSrividya GayathriSrividya commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

closes #3291

Summary

  • Strip the Expect header from S3 requests before calling the REST signing service.
  • Prevent Expect: 100-continue from being included in the signing payload and signed headers.
  • Add a regression test that verifies Expect is not forwarded to the signer service.

Root cause

The S3 REST signer forwarded all request headers to the signer endpoint. Some S3-compatible signing services reject signing payloads that include Expect: 100-continue, resulting in SignError with HTTP 412.

Changes

  • In pyiceberg/io/fsspec.py:
    • Remove any Expect header before constructing signer request payload in S3V4RestSigner.call.
  • In tests/io/test_fsspec.py:
    • Add test_s3v4_rest_signer_strips_expect_header to validate Expect is removed from both the signer payload and request headers.

Validation

  • /opt/homebrew/bin/ruff format pyiceberg/io/fsspec.py tests/io/test_fsspec.py
  • /opt/homebrew/bin/ruff check --fix pyiceberg/io/fsspec.py tests/io/test_fsspec.py
  • /path/.venv/bin/python -m pytest tests/io/test_fsspec.py -k 's3v4_rest_signer' -xvs

@github-actions

Copy link
Copy Markdown

This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that's incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the dev@iceberg.apache.org list. Thank you for your contributions.

@github-actions github-actions Bot added the stale label Jul 19, 2026
@github-actions

Copy link
Copy Markdown

This pull request has been closed due to lack of activity. This is not a judgement on the merit of the PR in any way. It is just a way of keeping the PR queue manageable. If you think that is incorrect, or the pull request requires review, you can revive the PR at any time.

@github-actions github-actions Bot closed this Jul 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Failed to sign request 412 - Expect: ['100-continue']

1 participant