[prev in list] [next in list] [prev in thread] [next in thread] 

List:       tomcat-dev
Subject:    [TC4] Missing automatic content length, was: Re: Filters and
From:       Wolfgang Hoschek <wolfgang.hoschek () cern ! ch>
Date:       2001-09-29 13:41:25
[Download RAW message or body]

Noticed a further point where TC4 seems to violate the 2.3 spec.
Spec 2.3 (and javadoc) says on HTTPServlet.doGet, doPost, etc.

"Where possible, set the Content-Length header (with the
     ServletResponse.setContentLength(int) method), to allow the servlet 
container to use
     a persistent connection to return its response to the client, 
improving performance. The
     content length is automatically set if the entire response fits inside 
the response buffer."

As far as I can see from the TC4 http.HttpConnector and related source the 
content length is never automatically set, no matter what buffer size. 
Without content-length many HTTP clients approach 100% CPU consumption 
because reading a response reliably without knowing its length is 
expensive. Also prevents persistent connections.

Am I missing something?

Wolfgang.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic