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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]