danielcweeks commented on code in PR #17457:
URL: https://github.com/apache/iceberg/pull/17457#discussion_r3917001260
##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3FileIO.java:
##########
@@ -149,11 +157,21 @@ public S3FileIO(SerializableSupplier<S3Client> s3,
SerializableSupplier<S3AsyncC
@Override
public InputFile newInputFile(String path) {
+ if (HttpUrlClient.isHttpUrl(path)) {
+ S3PresignedReadValidation.checkTrustedHttpsUrl(path,
presignedReadAllowedHosts());
+ return httpUrlClient().newInputFile(path, metrics);
+ }
+
return S3InputFile.fromLocation(path, clientForStoragePath(path), metrics);
}
@Override
public InputFile newInputFile(String path, long length) {
+ if (HttpUrlClient.isHttpUrl(path)) {
Review Comment:
Similar to above, this should be delegated to a superclass implementation
that can be shared across IO implementations.
--
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]