You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@iceberg.apache.org by "plusplusjiajia (via GitHub)" <gi...@apache.org> on 2025/12/15 08:25:04 UTC
[PR] fix(rest): handle empty body in AWS SigV4 signing [iceberg-python]
plusplusjiajia opened a new pull request, #2827:
URL: https://github.com/apache/iceberg-python/pull/2827
# Rationale for this change
The x-amz-content-sha256 header is required for AWS requests. It provides a hash of the request payload. If there is no payload, you must provide the hash of an empty string.
## Are these changes tested?
## Are there any user-facing changes?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(rest): handle empty body in AWS SigV4 signing [iceberg-python]
Posted by "Fokko (via GitHub)" <gi...@apache.org>.
Fokko commented on code in PR #2827:
URL: https://github.com/apache/iceberg-python/pull/2827#discussion_r2660898364
##########
pyiceberg/catalog/rest/__init__.py:
##########
@@ -560,7 +561,12 @@ def add_headers(self, request: PreparedRequest, **kwargs: Any) -> None: # pylin
params = dict(parse.parse_qsl(query))
# remove the connection header as it will be updated after signing
- del request.headers["connection"]
+ if "connection" in request.headers:
+ del request.headers["connection"]
+ # For empty bodies, explicitly set the content hash header to the SHA256 of an empty string
+ body = request.body
+ if body in (None, b"", ""):
Review Comment:
Nit, I think we can slightly simplify this:
```suggestion
if not request.body:
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(rest): handle empty body in AWS SigV4 signing [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu merged PR #2827:
URL: https://github.com/apache/iceberg-python/pull/2827
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(rest): handle empty body in AWS SigV4 signing [iceberg-python]
Posted by "kevinjqliu (via GitHub)" <gi...@apache.org>.
kevinjqliu commented on PR #2827:
URL: https://github.com/apache/iceberg-python/pull/2827#issuecomment-3757459484
Thanks for the PR @plusplusjiajia and thank you for the review @geruh @Fokko
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org
Re: [PR] fix(rest): handle empty body in AWS SigV4 signing [iceberg-python]
Posted by "plusplusjiajia (via GitHub)" <gi...@apache.org>.
plusplusjiajia commented on PR #2827:
URL: https://github.com/apache/iceberg-python/pull/2827#issuecomment-3705210971
> thanks for the PR! could you provide some context around this change? and perhaps a test
I found the
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@iceberg.apache.org
For additional commands, e-mail: issues-help@iceberg.apache.org