malaysf commented on PR #550:
URL: https://github.com/apache/tomcat/pull/550#issuecomment-1238435761

   The TestSwallowAbortedUploads test fails so I need to look into that.
   
   We ran into this issue in production and were able to reproduce with curl or 
postman requests to an API that returns 200 without ever reading the request 
body.
   
   I don't think that the core logic is wrong in `Http11Processor.ack`, in this 
situation `ack` is never called since the request body input stream is never 
read from, which triggers the `ack`.
   
   When a request is started, `Http11Processor.prepareExpectation` sets 
`inputBuffer.setSwallowInput(false);` but `keepAlive` is still set to true. If 
`keepAlive` is true, then the inputBuffer's swallow state must be set to true 
as well to ensure that the request stream is advanced to the beginning of the 
next request, regardless of whether the servlet consumed all the bytes.
   
   


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

Reply via email to