Re: Trailer header and tomcat

2009-08-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 André, On 8/5/2009 7:09 PM, André Warnier wrote: Servlet Specification 2.4, SRV 5.2, Headers : To be successfully transmitted back to the client, headers must be set before the response is committed. Headers set after the response is committed

Re: Trailer header and tomcat

2009-08-06 Thread Michael Ludwig
Christopher Schultz schrieb: When chunked encoding is being used, HTTP allows you to include headers after the response by including a final chunk with more headers for the previous chunk. So those traling headers are actually footers. The headers you want in this chunk should be mentioned

Re: Trailer header and tomcat

2009-08-06 Thread André Warnier
Michael Ludwig wrote: Christopher Schultz schrieb: When chunked encoding is being used, HTTP allows you to include headers after the response by including a final chunk with more headers for the previous chunk. I am well aware of that, at the HTTP level. However, the Servlet Spec seems to

Re: Trailer header and tomcat

2009-08-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Michael, On 8/6/2009 10:08 AM, Michael Ludwig wrote: Christopher Schultz schrieb: When chunked encoding is being used, HTTP allows you to include headers after the response by including a final chunk with more headers for the previous chunk.

Re: Trailer header and tomcat

2009-08-06 Thread Keyur Shah
I agree with Chris and I also appreciate Michael's dilemma. While headers can never be added as headers once the response is committed, the trailer headers are in fact encoded in the body itself. So the convention could be that if a user has specified certain trailer headers:

Re: Trailer header and tomcat

2009-08-06 Thread Mark Thomas
André Warnier wrote: Michael Ludwig wrote: Christopher Schultz schrieb: When chunked encoding is being used, HTTP allows you to include headers after the response by including a final chunk with more headers for the previous chunk. I am well aware of that, at the HTTP level. However, the

Re: Trailer header and tomcat

2009-08-06 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Keyur, On 8/6/2009 12:35 PM, Keyur Shah wrote: While headers can never be added as headers once the response is committed, the trailer headers are in fact encoded in the body itself. So the convention could be that if a user has specified

Re: Trailer header and tomcat

2009-08-06 Thread Keyur Shah
~ Do you know enough about Tomcat's chunking implementation to write a patch (I certainly do not)? Nope. I wish I did though... --Keyur Christopher Schultz-2 wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Keyur, On 8/6/2009 12:35 PM, Keyur Shah wrote: While headers can never

Re: Trailer header and tomcat

2009-08-05 Thread Filip Hanik - Dev Lists
On 08/05/2009 02:14 PM, Keyur Shah wrote: Tomcat by default sends chunked responses = Transfer-Encoding:chunked I'm calculating the ETag for the response dynamically as the content is being written to the response stream. Since I'll know the final value of the ETag only when the stream is

Re: Trailer header and tomcat

2009-08-05 Thread Keyur Shah
Thanks Filip. Buffering is what I do right now and that is what I'm trying to avoid. With a large number of concurrent users, the buffering is proving to be a performance bottleneck and is causing frequent GC sweeps. I think what I'm trying to do with the Trailer header is valid http usage

RE: Trailer header and tomcat

2009-08-05 Thread Martin Gainty
contenu fourni. Date: Wed, 5 Aug 2009 14:55:35 -0700 From: keyu...@gmail.com To: users@tomcat.apache.org Subject: Re: Trailer header and tomcat Thanks Filip. Buffering is what I do right now and that is what I'm trying to avoid. With a large number of concurrent users, the buffering

RE: Trailer header and tomcat

2009-08-05 Thread Keyur Shah
ne pouvons accepter aucune responsabilité pour le contenu fourni. Date: Wed, 5 Aug 2009 14:55:35 -0700 From: keyu...@gmail.com To: users@tomcat.apache.org Subject: Re: Trailer header and tomcat Thanks Filip. Buffering is what I do right now and that is what I'm trying to avoid

Re: Trailer header and tomcat

2009-08-05 Thread André Warnier
Keyur, I think what Filip was trying to tell you is this : Servlet Specification 2.4, SRV 5.2, Headers : To be successfully transmitted back to the client, headers must be set before the response is committed. Headers set after the response is committed will be ignored by the servlet