moomindani commented on code in PR #17979:
URL: https://github.com/apache/iceberg/pull/17979#discussion_r3985042191


##########
core/src/main/java/org/apache/iceberg/rest/HTTPClient.java:
##########
@@ -337,7 +337,9 @@ private <T extends RESTResponse> T handleResponse(
       Consumer<Map<String, String>> responseHeaders,
       ParserContext parserContext)
       throws IOException {
-    Map<String, String> respHeaders = Maps.newHashMap();
+    // Field names are case-insensitive (RFC 9110), and HTTP/2 requires them 
to be lowercase, so
+    // callers cannot rely on a server's chosen spelling to look a header up.

Review Comment:
   You are right, and thanks for pushing on it — the sentence conflated the 
rule with the motivation. `ac9b0fde9` drops HTTP/2 from all three production 
comments, leaving RFC 9110 as the reason the map has to be case-insensitive.
   
   I kept HTTP/2 in the test comments, on your own reasoning: it is the 
explanation for why a server emits lowercase, so it belongs with the fixtures 
that simulate one. Say the word if you would rather it were gone from there too.
   
   That commit also removes a comment I had accidentally duplicated in 
`S3V4RestSignerClient`. Sorry for the noise.
   



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

Reply via email to