danielcweeks commented on code in PR #11992:
URL: https://github.com/apache/iceberg/pull/11992#discussion_r1926113976


##########
core/src/main/java/org/apache/iceberg/rest/HTTPClient.java:
##########
@@ -88,33 +84,30 @@ public class HTTPClient implements RESTClient {
 
   @VisibleForTesting static final String REST_SOCKET_TIMEOUT_MS = 
"rest.client.socket-timeout-ms";
 
-  private final String uri;
+  private final URI baseUri;
   private final CloseableHttpClient httpClient;
+  private final Map<String, String> baseHeaders;
   private final ObjectMapper mapper;
+  private final AuthSession authSession;
 
   private HTTPClient(
-      String uri,
+      URI baseUri,
       HttpHost proxy,
       CredentialsProvider proxyCredsProvider,
       Map<String, String> baseHeaders,
       ObjectMapper objectMapper,
       HttpRequestInterceptor requestInterceptor,
       Map<String, String> properties,
       HttpClientConnectionManager connectionManager) {
-    this.uri = uri;
+    this.baseUri = baseUri;
+    this.baseHeaders = baseHeaders;
     this.mapper = objectMapper;
+    this.authSession = AuthSession.EMPTY;

Review Comment:
   I think defaulting to empty opens up a risk that requests will be made 
without an explicit session.  This somewhat hides the case where we missed a 
call that should have auth.  I would think we would leave this a null and 
require that a session be used (e.g. validate the auth was set in the `execute` 
call).  Thoughts @nastra?



-- 
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

Reply via email to