Hi there,

I noticed today TC behavior in TC 9 HEAD (but probably not specific to it), that a POST with "Expect: 100-Continue" first gets a correct status 100 response from TC. Then the client (an Apache reverse proxy) send the request body and the application correctly processes it and finally sends back a 302 redirect as expected for that application.

But code in java/org/apache/coyote/http11/Http11Processor.java now set keepalive to false which will close the connection. The code in question is in checkExpectationAndResponseStatus() and gets called from prepareResponse() and endRequest().

I understand, that when no 100 response is send or the Redirect happens before the body was completely read, a connection close is correct. But why should we close the connection after a complete successful processing of the request/response?

I observed this when using Apache mod_proxy_http and mod_proxy_balancer with ping=5000, which wil add the expectation to any POST request. I wanted to tune Apache/Tomcat communication to use connections very long in order to reduce TLS handshakes during the servers. It turned out, that because the application always does redirect-after-POST and due to the above described TC behavior, the effective reuse for the connections was very small.

Any opinion on whether this behavior is correct?

Thanks and regards,

Rainer

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

Reply via email to