You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by GitBox <gi...@apache.org> on 2022/09/06 17:09:15 UTC

[GitHub] [tomcat] malaysf commented on pull request #550: Http11Processor's keep alive state and input buffer's swallow state must be synchronized

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-unsubscribe@tomcat.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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