httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bill Stoddard" <b...@wstoddard.com>
Subject Re: cvs commit: httpd-2.0/modules/metadata mod_headers.c
Date Fri, 01 Jun 2001 12:38:28 GMT
> stoddard@apache.org wrote:
>
> >   Add the 'echo' option to mod_headers Header directive. Use the new option
> >   like this:
> >
> >   Header echo regex
> >
> >   If a header received on a request matches regex, it is copied to the response
> >   headers.
>
> Would it not make more sense to add "echo" to RequestHeader instead of
> Header, because it's the request header being echoed...?
>

I considered this. It seems technically cleaner (and less error prone) to do all the
response header work, including echoing, in the same place during request processing.
Splitting the response header work across multiple phases is a good way to introduce
non-intuitive behaviour in the header processing (think module order dependencies).  That
was my thinking anyway.

Just to let you know where I am going...
I plan to refine the patch I posted to the list a week or so ago that allows
mod_log_config style format strings to be passed on Header add|append directives. E.g.

Header add YaddaYadda "%t %D"

I was also considering adding some conditional processing to the Header add (and append,
et. al). Something perhaps like this:

Header add  YaddaYadda  "%t %D"  env=var

env would be controlled by a SetEnvIf statement to detect, say, the presense of a
particular request header.  If a particular request header is present, then header
YaddaYadda would be added to the response.

This will be -really- useful for clients instrumented to do end-to-end performance
monitoring.  The client can send a special header (signaling its presense) which will
cause Apache to collect various bits of information (configurable on the Header add format
string) and send that info back to the client in the response headers.

Bill


Mime
View raw message