babyblue94520 commented on code in PR #645: URL: https://github.com/apache/tomcat/pull/645#discussion_r1289412320
########## java/org/apache/coyote/http11/Http11Processor.java: ########## @@ -999,7 +999,12 @@ protected final void prepareResponse() throws IOException { int keepAliveTimeout = protocol.getKeepAliveTimeout(); if (keepAliveTimeout > 0) { - String value = "timeout=" + keepAliveTimeout / 1000L; + StringBuilder value = new StringBuilder(); + value.append("timeout=").append(keepAliveTimeout / 1000L); + int maxKeepAliveRequests = protocol.getMaxKeepAliveRequests(); + if (maxKeepAliveRequests > 0) { Review Comment: How is this idea implemented here? Because it affects keepAliveLeft. [AbstractEndpoint](https://github.com/apache/tomcat/blob/main/java/org/apache/tomcat/util/net/AbstractEndpoint.java) ``` public int getMaxKeepAliveRequests() { // Disable keep-alive if the server socket is not bound if (bindState.isBound()) { return maxKeepAliveRequests; } else { return 1; } } ``` -- 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: dev-unsubscr...@tomcat.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org