nastra commented on code in PR #12406: URL: https://github.com/apache/iceberg/pull/12406#discussion_r1995070804
########## core/src/main/java/org/apache/iceberg/rest/HTTPClient.java: ########## @@ -489,6 +499,36 @@ public HTTPClient build() { withHeader(CLIENT_VERSION_HEADER, IcebergBuild.fullVersion()); withHeader(CLIENT_GIT_COMMIT_SHORT_HEADER, IcebergBuild.gitCommitShortId()); + String proxyHostname = + PropertyUtil.propertyAsString(properties, HTTPClient.REST_PROXY_HOSTNAME, null); + + Integer proxyPort = + PropertyUtil.propertyAsNullableInt(properties, HTTPClient.REST_PROXY_PORT); + + if (proxyHostname != null && !proxyHostname.isEmpty() && proxyPort != null) { Review Comment: you can use `!Strings.isNullOrEmpty(proxyHostname)`. Same further below with username/password ########## core/src/main/java/org/apache/iceberg/rest/HTTPClient.java: ########## @@ -489,6 +499,36 @@ public HTTPClient build() { withHeader(CLIENT_VERSION_HEADER, IcebergBuild.fullVersion()); withHeader(CLIENT_GIT_COMMIT_SHORT_HEADER, IcebergBuild.gitCommitShortId()); + String proxyHostname = + PropertyUtil.propertyAsString(properties, HTTPClient.REST_PROXY_HOSTNAME, null); + + Integer proxyPort = + PropertyUtil.propertyAsNullableInt(properties, HTTPClient.REST_PROXY_PORT); + + if (proxyHostname != null && !proxyHostname.isEmpty() && proxyPort != null) { + withProxy(proxyHostname, proxyPort); + + String proxyUsername = + PropertyUtil.propertyAsString(properties, HTTPClient.REST_PROXY_USERNAME, null); + + String proxyPassword = + PropertyUtil.propertyAsString(properties, HTTPClient.REST_PROXY_PASSWORD, null); + + if (proxyUsername != null + && !proxyUsername.isEmpty() + && proxyPassword != null + && !proxyPassword.isEmpty()) { + + /* currently only basic auth is supported */ Review Comment: ```suggestion // currently only basic auth is supported ``` -- 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-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org