httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rodent of Unusual Size <Ken.C...@Golux.Com>
Subject Re: Thoughts on maintaining Vary
Date Sun, 05 Jul 1998 16:07:38 GMT
More random thoughts on this..

mod_rewrite needs to be handled specially because it does a lot
of its header field-based work directly.  However, it also uses
envariables to make decisions, including envariables that are
set according to header field values.

mod_access is the only other [standard] module that makes
decisions based upon envariables.  (Aside from protocol
labelling, which doesn't count.)  mod_setenvif and mod_rewrite
are the only ones that set envariables based upon header field
values.

So here's another approach, specifically aimed at the envariable
case:

Add a envar->fieldname(s) table to the request_rec.  When something
sets an envariable based upon a request header field, it does a

    table_add(r->envar_vary, envar, fieldname);

And when something makes a decision based upon an envariable's
setting, it does a

    if ((v = table_get(r->envar_vary, envar)) != NULL) {
        table_add(r->headers_out, "Vary", v);
    }

These activities would actually be put into routines in
http_request.c so that modules would only need to add a single
call for each activity.

Again, at the moment this only means mod_access and mod_rewrite.
But who knows what else may turn up, either in 3p modules or our
own stuff in the future.. we had quite a fad for envariable
conditionals a while ago.

I still don't like this much; it seems like a lot of overhead.
And I haven't even looked at the subrequest issues yet.  On the
other hand, anything involving the use of envariables is already
pretty high overhead, and (I expect) by far the exception rather
than the rule, so I think the extra work for the sake of 2068
correctness is probably acceptable.

#ken	P-)}

Ken Coar                    <http://Web.Golux.Com/coar/>
Apache Group member         <http://www.apache.org/>
"Apache Server for Dummies" <http://Web.Golux.Com/coar/ASFD/>

Mime
View raw message