capistrant commented on code in PR #18424:
URL: https://github.com/apache/druid/pull/18424#discussion_r2359492745


##########
server/src/main/java/org/apache/druid/server/initialization/jetty/StandardResponseHeaderFilterHolder.java:
##########
@@ -66,16 +66,17 @@ public StandardResponseHeaderFilterHolder(final 
ServerConfig serverConfig)
    * Remove any standard headers in proxyResponse if they were also set in the 
origin response, serverResponse.
    * This prevents duplicates headers from appearing in proxy responses.
    *
-   * Used by implementations of {@link 
org.eclipse.jetty.proxy.AsyncProxyServlet}.
+   * Used by implementations of {@link 
org.eclipse.jetty.ee8.proxy.AsyncProxyServlet}.
    */
   public static void deduplicateHeadersInProxyServlet(
       final HttpServletResponse proxyResponse,
       final Response serverResponse
   )
   {
     for (final String headerName : 
StandardResponseHeaderFilterHolder.STANDARD_HEADERS) {
-      if (serverResponse.getHeaders().containsKey(headerName) && 
proxyResponse.containsHeader(headerName)) {
-        ((org.eclipse.jetty.server.Response) 
proxyResponse).getHttpFields().remove(headerName);
+      if (serverResponse.getHeaders().contains(headerName) && 
proxyResponse.containsHeader(headerName)) {
+        // In Jetty 12 EE8, use the standard servlet API method to remove 
headers

Review Comment:
   eh, I meant method as in "procedure of doing something".. Bad choice of 
words when writing a comment in Java code 😆 I will clarify



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