puchengy commented on code in PR #5495:
URL: https://github.com/apache/gravitino/pull/5495#discussion_r1831203363


##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/IcebergRestUtils.java:
##########
@@ -122,6 +126,19 @@ public static NameIdentifier getGravitinoNameIdentifier(
     return NameIdentifier.of(catalogNS.toArray(String[]::new));
   }
 
+  public static Map<String, String> getHttpHeaders(HttpServletRequest 
httpServletRequest) {
+    Map<String, String> headers = new HashMap<>();
+    Enumeration<String> headerNames = httpServletRequest.getHeaderNames();
+    while (headerNames.hasMoreElements()) {
+      String headerName = headerNames.nextElement();
+      String headerValue = httpServletRequest.getHeader(headerName);
+      if (headerValue != null) {

Review Comment:
   Curious is there a chance that headerValue can be null here?



##########
iceberg/iceberg-rest-server/src/main/java/org/apache/gravitino/iceberg/service/rest/IcebergTableOperations.java:
##########
@@ -82,7 +82,7 @@ public class IcebergTableOperations {
   private ObjectMapper icebergObjectMapper;
   private IcebergTableOperationDispatcher tableOperationDispatcher;
 
-  @Context private HttpServletRequest httpRequest;
+  @Inject private Provider<HttpServletRequest> httpRequest;

Review Comment:
   Curious why is this needed?



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

Reply via email to