tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <>
Subject Re: Implementing mod_headers for response in Tomcat7
Date Sun, 01 Apr 2012 18:38:52 GMT
On 01/04/2012 10:15, Teppei Yamada wrote:
> Hi,
> I wanted to write something similar to apache httpd's mod_headers so I
> read through Tomcat7.0.26 source code.
> Then I realized that that could not be achieved without modifying coyote's
> Abstract(Http11|Ajp)Processor.prepareResponse().
> That can never be done by Valve because some HTTP headers are added just
> in (or SessionCookie is right before) prepareResponse function and it
> immediately writes headers to OutputBuffer and set committed.

A Valve would be the way to address this requirement.

> So I propose inserting some code in prepareResponse.
> Is is acceptable?

You can customise Tomcat as you see fit, at your own risk.

Given your other thread regarding secure session cookies, I assume that
your requirement above is derived from a wish to modify the cookie header?


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



View raw message