markt-asf commented on a change in pull request #332:
URL: https://github.com/apache/tomcat/pull/332#discussion_r470715185



##########
File path: java/org/apache/catalina/core/StandardContextValve.java
##########
@@ -81,7 +82,17 @@ public final void invoke(Request request, Response response)
 
         // Acknowledge the request
         try {
-            response.sendAcknowledgement();
+            // Acknowledge based on the policy
+            final ContinueHandlingResponsePolicy 
continueHandlingResponsePolicy = (ContinueHandlingResponsePolicy) 
request.getConnector().getProperty("continueHandlingResponsePolicy");
+

Review comment:
       Code lines need to wrap at 120 chars. This one looks too long.

##########
File path: java/org/apache/coyote/AbstractProtocol.java
##########
@@ -262,6 +267,17 @@ public void setConnectionLinger(int connectionLinger) {
         endpoint.setConnectionLinger(connectionLinger);
     }
 
+    // ------------------------------------------------ HTTP specific 
properties
+    // ----------------------------------------- queried by 
StandardContextValve
+    public void setContinueHandlingResponsePolicy(String value) {
+        continueHandlingResponsePolicy = 
Enum.valueOf(ContinueHandlingResponsePolicy.class, value);

Review comment:
       I think you need a `trim()` and a `.toUpperCase(Locale.ENGLISH)` here

##########
File path: java/org/apache/catalina/connector/Response.java
##########
@@ -1197,16 +1197,12 @@ public String encodeUrl(String url) {
     public void sendAcknowledgement()
         throws IOException {
 
-        if (isCommitted()) {

Review comment:
       I'm still uncomfortable with this check moving. I like that it is the 
first check in all the `connector.Reponse` methods that need it. I think I'd 
prefer duplication (as per `setCharacterEncoding()`).




----------------------------------------------------------------
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:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to