httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <>
Subject Re: IE4 PR2 hopelessness
Date Fri, 18 Jul 1997 07:33:18 GMT
On Fri, 18 Jul 1997, Dean Gaudet wrote:

> My suggestion for now: make mod_browser use translate_name instead of
> header_parse.  A cleaner solution is to add yet another api phase.
> Note that this means mod_browser is going to run during a
> sub_req_lookup_uri(), but I don't think this is a problem (and using
> something like is_initial_request does not work, see next message).

Ok, this is the next message.  Trying to work around these pr2 bugs lead
me into areas of the server that I only think about in my nightmares.

I innocently added:

    if (r->prev || r->main) {
	/* subrequest, we've already dealt with the environment */
	return DECLINED;

to the mod_browser routine.  In theory this would avoid mod_browser
from running on every subrequest... but in practice it fails to do what
we want.

Consider how mod_negotiation does its thing: internal_redirect.
An internal_redirect is *not* a subrequest in that it does not copy/merge
things from the main request the same way that subrequests do.  With the
above test the internal_redirect request would not have the env vars set.

You can't just test r->main either 'cause internal_redirects have
r->main set to the initial request.  r->prev != NULL indicates that r
is an internal_redirect.

At any rate ... while I'm going through this I'm thinking about the extra
API phase that I'd want to clean up mod_browser.  That's when I start
to realise that to do this all properly, the various tests of env-vars
need to do something like

    table_get((r->main ? r->main : r)->subprocess_env, "enable-kludge")

Rather than just using r->subprocess_env.

And the reason this all bugs me is that none of it seems clean ... and
that's probably because the rules for generating a subrequest from a
request or generating a redirect from a request aren't very well defined.

Consider all the dinking around in subrequests that goes on in
mod_negotiation, and mod_include.  Is it valid?  Is that part of the API?
Look at how many little bugs we fixed in mod_negotiation during the
1.2 betas.



View raw message