creechy commented on code in PR #11954: URL: https://github.com/apache/iceberg/pull/11954#discussion_r1913536698
########## core/src/main/java/org/apache/iceberg/rest/RESTUtil.java: ########## @@ -215,4 +215,19 @@ public static Namespace decodeNamespace(String encodedNs) { return Namespace.of(levels); } + + public static String buildCredentialEndpoint(String catalogUri, String credentialEndpoint) { + if (null == credentialEndpoint) { + return null; + } + + if (null == catalogUri + || credentialEndpoint.startsWith("http://") + || credentialEndpoint.startsWith("https://")) { + return credentialEndpoint; + } + + // support relative refresh endpoint + return RESTUtil.stripTrailingSlash(catalogUri) + credentialEndpoint; Review Comment: Do you also want to ensure that `credentialEndpoint` has a leading slash? -- 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