On 17/10/2016 16:53, André Warnier (tomcat) wrote:


> In this case, the OP originally mentioned "add an attribute to the
> request".
> I have the feeling that the word "attribute" here was not very specific,
> and in reality (since we are talking about an authentication method
> "faking" another one) it may have meant "add a HTTP header" (the OP is
> welcome to correct if I am mistaken).
> Assuming that you were in a Filter, what you would need to do in such a
> "wrapper", would probably be to
> 1) copy the existing request headers in your own, wrapper-specific, new,
> headers collection
> 2) add the additional header to that copied collection
> 3) override all the methods by which one can obtain these headers, to
> return the copied/modified version instead of the original headers
> collection (or member of)
> But maybe in a Valve, you do not need to go through all of that, and you
> can modify the original headers collection directly. (question mark)

Correct. In a Valve, you can modify request headers directly.


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

Reply via email to