smaheshwar-pltr commented on code in PR #4039:
URL: https://github.com/apache/iceberg-python/pull/4039#discussion_r4151681122
##########
pyiceberg/io/fsspec.py:
##########
@@ -148,6 +148,9 @@ def __call__(self, request: "AWSRequest", **_: Any) -> None:
"uri": request.url,
"headers": {key: [val] for key, val in request.headers.items()},
}
+ if request.method == "POST" and "delete" in
parse_qs(urlparse(request.url).query, keep_blank_values=True):
+ if body := request.body:
+ signer_body["body"] = body.decode("utf-8")
Review Comment:
The bytes assumption comes from [Botocore's REST XML
serializer](https://github.com/boto/botocore/blob/9fda087a19c80ad04bff404fc463571ec8a9ec3f/botocore/serialize.py#L1107-L1115),
which serializes the request using its [UTF-8
default](https://github.com/boto/botocore/blob/9fda087a19c80ad04bff404fc463571ec8a9ec3f/botocore/serialize.py#L106-L110).
[AWSRequest.body](https://github.com/boto/botocore/blob/9fda087a19c80ad04bff404fc463571ec8a9ec3f/botocore/awsrequest.py#L483-L488)
exposes that prepared body. Decoding creates the string expected by the
signing API; it does not replace the original XML bytes or checksum headers
sent to S3. The guards above prevent accessing unrelated upload streams.
--
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]