https://issues.apache.org/bugzilla/show_bug.cgi?id=56190

Francois-Xavier Bonnet <f...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|INVALID                     |---

--- Comment #4 from Francois-Xavier Bonnet <f...@apache.org> ---
Thanks for your answers. I had a closer look at the specifications and there is
no problem about the keep-alive header.

About the "Transfer-Encoding: chunked" header, in my test I am just writing
"Hello world" in the response (should be small enough for the buffer), there is
no flush so when I call AsyncContext.complete() method  the content size is
perfectly known and I would expect the server to set the content-length header
and not to use chunked content encoding.
According to servlet 3.0 specification "The content length is automatically set
if the entire response fits inside the response buffer."
http://docs.oracle.com/javaee/6/api/javax/servlet/http/HttpServlet.html#doGet(javax.servlet.http.HttpServletRequest,
javax.servlet.http.HttpServletResponse)

Just to explain how I found this issue: I was doing some tests with Apache
Benchmark. I was surprised to see that the performance of Tomcat were not good
compared to other servlet containers, then I noticed that keep-alive was not
working with tomcat while it was with other servlet containers like Jetty. It
looks like ab disables keep-alive when the response is chunked.

-- 
You are receiving this mail because:
You are the assignee for the bug.

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

Reply via email to