tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tim Funk <funk...@joedog.org>
Subject Re: HTTP persistence with Tomcat 4.1.29
Date Thu, 18 Nov 2004 15:07:01 GMT
 > verified that the client is sending "Keep-Alive". Is there any way to log
 > the response header "Connection" to see whether the server is not sending
 > "Close" in the response? I can't find a way to log response headers in

Not really. (With the existing code base)

Chunked encoding is needed for keep-alive to be effective. If you don't use 
chunked encoding, then your servlet must set the content length. Otherwise - 
the client won't know how much data is being returned. WIth chunked encoding 
  - data can be sent immediately without knowing the content length. (Just 
the length of the current chunk)

-Tim

Chandrasekar Krishnan wrote:

> Dear Tomcat users,
> 
> What is the most reliable way to verify that persistent HTTP connections
> are maintained between a Tomcat server and a Java based Http Client
> (both HTTP 1.0 and 1.1 requests)? I've tried something on my own
> unsuccessfully.
> 
> On the Tomcat server, I have turned on logging for the incoming header
> "Connection" using AccessLogValve Pattern (using %{Connection}i) and
> verified that the client is sending "Keep-Alive". Is there any way to log
> the response header "Connection" to see whether the server is not sending
> "Close" in the response? I can't find a way to log response headers in
> Tomcat. I have used netstat, but I can't get clinching evidence with it. 
> 
> Is it true that the Tomcat servlet needs to call setContentLength for
> dynamic content to support persistent connections, even for HTTP 1.1
> requests or is HTTP 1.1 sophisticated enough that it doesn't need that
> header to maintain HTTP persistence? There are concerns with setting that
> header if it's not needed, since it can cause a connection to hang if set
> to an incorrect value.


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


Mime
View raw message