eolivelli commented on a change in pull request #9744:
URL: https://github.com/apache/pulsar/pull/9744#discussion_r583794831



##########
File path: 
pulsar-broker/src/main/java/org/apache/pulsar/broker/web/ResponseHandlerFilter.java
##########
@@ -55,8 +56,13 @@ public ResponseHandlerFilter(PulsarService pulsar) {
     public void doFilter(ServletRequest request, ServletResponse response, 
FilterChain chain)
             throws IOException, ServletException {
 
+        if (!response.isCommitted()) {
+            ((HttpServletResponse) 
response).addHeader(BROKER_ADDRESS_HEADER_NAME, brokerAddress);
+        } else {
+            LOG.warn("Cannot add header {} to request {} since it's already 
committed.", BROKER_ADDRESS_HEADER_NAME,
+                    request);

Review comment:
       What's the actual output of the request#toString? 
   Can we log just useful info, like client IP, METHOD and URI?




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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to