Skip to content

Commit 61110bc

Browse files
Update pyiceberg/catalog/rest/__init__.py
Co-authored-by: Fokko Driesprong <fokko@apache.org>
1 parent 4d0615f commit 61110bc

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

pyiceberg/catalog/rest/__init__.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -564,8 +564,7 @@ def add_headers(self, request: PreparedRequest, **kwargs: Any) -> None: # pylin
564564
if "connection" in request.headers:
565565
del request.headers["connection"]
566566
# For empty bodies, explicitly set the content hash header to the SHA256 of an empty string
567-
body = request.body
568-
if body in (None, b"", ""):
567+
if not request.body:
569568
request.headers["x-amz-content-sha256"] = EMPTY_BODY_SHA256
570569

571570
aws_request = AWSRequest(

0 commit comments

Comments
 (0)