tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Barker" <>
Subject Re: Adding header action filters to Catalina connector
Date Mon, 06 Dec 2004 19:18:54 GMT

----- Original Message -----
From: "Mladen Turk" <>
To: "Tomcat Developers List" <>
Sent: Monday, December 06, 2004 4:04 AM
Subject: Adding header action filters to Catalina connector

> Hi All,
> What would be the proper solution for the following problems:
> 1. Having server wide API for setting outgoing header.
> There should be a callback that can call a registered method
> for each registered header value.
> 2. Having server wide API for taking actions on the
> particular registered input header value.
> Could something like that be accomplished with the current
> filters API or some extra core coding is required?
> For example:
> I wish to register a class that will when request with 'FOO=BAR'
> header is received (either in or out) an action will be taken
> with the 'BAR' and direction param.
> The purpose for that would be:
> 1. Proxy(mod_jk) sends X_TOMCAT_QUERY=AVARAGE_PROC_TIME
>     Tomcat's (X_TOMCAT_QUERY) handler will be called with
>     AVERAGE_PROC_TIME param, gather stat and...
> 2. Tomcat out header filter for X_TOMCAT_QUERY
>     will on respond insert header X_TOMCAT_QUERY_AVERAGE_PROC_TIME=107
> Any ideas?

I'd think that adding a new AJP Message number would be the cleanest.
Allowing the response to be triggered by HTTP Headers in an arbitrary
Request is a security problem (I certainly don't want to publish this
information to the entire world :).  If the API gets complex enough, we
could resurrect HandlerDispatch to deal with it.  Otherwise, you would just
need to insert a Handler in the Jk request chain.

> MT.
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

This message is intended only for the use of the person(s) listed above as the intended recipient(s),
and may contain information that is PRIVILEGED and CONFIDENTIAL.  If you are not an intended
recipient, you may not read, copy, or distribute this message or any attachment. If you received
this communication in error, please notify us immediately by e-mail and then delete all copies
of this message and any attachments.

In addition you should be aware that ordinary (unencrypted) e-mail sent through the Internet
is not secure. Do not send confidential or sensitive information, such as social security
numbers, account numbers, personal identification numbers and passwords, to us via ordinary
(unencrypted) e-mail.

View raw message