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
(correct me if that's wrong). And I was hoping tomcat supports this usage.

--Keyur


Filip Hanik - Dev Lists wrote:
> 
> 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 closed, I indicate that using the Trailer header =>
>> Trailer:
>> ETag
>>
>> I'm ensuring that just before the stream is closed, I set the ETag header
>> =>
>> ETag: SomeETagValue
>>
>> However, when I look at the response on the client, the ETag header was
>> never
>> written.
>>
>> Is this a tomcat specific bug or am I doing something wrong?
>>    
> When you write, after you have filled up the buffer, tomcat will commit 
> the response.
> You will need to not write any of your response until you have the tag, 
> so buffer your response,
> calculate your tag, set the header, write the response
> 
> Filip
>> Thanks,
>> Keyur
>>    
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Trailer-header-and-tomcat-tp24835409p24836927.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


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

Reply via email to