struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Finney" <>
Subject adding a content-length header
Date Mon, 02 Mar 2009 02:48:37 GMT

Hypothetically: Let's say I am working with a server that does not always
send a HTTP response with a content-length header or a Transfer-Encoding of
chunked (with all the required other stuff set). 

The following thought came to mind: Shouldn't there be a way to get the
length of the content I am sending back? I could just add the header
content-length to the response if content-length and Transfer-Encoding
headers are both missing from the HttpServletResponse. 

Could I create my own Result by subclassing 
the Dispatcher Result, and somehow get access to the length of the content
which has been rendered? 

I could create an interceptor that after the invoke() I get the
HttpServletResponse. The question remains: How can I get access to the
content length of the content which has been rendered?


Michael Finney - "Always Striving To Serve You Better Every Day"

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message