reta commented on code in PR #3620:
URL: https://github.com/apache/cxf/pull/3620#discussion_r4362092387


##########
rt/features/logging/src/main/java/org/apache/cxf/ext/logging/event/HttpServletResponseHeaders.java:
##########
@@ -0,0 +1,143 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.cxf.ext.logging.event;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.TreeMap;
+import java.util.stream.Collectors;
+
+import jakarta.servlet.http.HttpServletResponse;
+import org.apache.cxf.common.util.PropertyUtils;
+import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageUtils;
+
+/**
+ * Reads the headers that were added directly to the HttpServletResponse (by 
the application or by
+ * a servlet filter) rather than to the protocol headers of the message. Kept 
separate from
+ * DefaultLogEventMapper so that the Servlet API stays an optional dependency.
+ */
+final class HttpServletResponseHeaders {

Review Comment:
   @ffang @coheigea I have some concerns related to this change: the logging 
feature (== interceptors) is supposed to work transparently for the server and 
the client. The servlet part is solely server specific (yes, we do check for 
servlet API presence but it looks really off). 
   
   I would suggest to 2 options, wondering what do you think:
     - add server favor of logging feature, or ...
     - make the HTTP response headers populated earlier, may be behind new 
RESPONSE_HEADERS  (or better, make sure those are part of PROTOCOL_HEADERS)
   
   Thanks, hope it makes sense.



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