Joshua Slive <[EMAIL PROTECTED]> wrote:
>On Wed, 18 Oct 2000, Tony Finch wrote:
>
>> >Joshua Slive wrote:
>> >>
>> >> So, here is a second draft of my "Apache Environment Variables"
>> >> doc.
>> >
>> Another suggestion: mention mod_rewrite's list of "environment"
>> variables. (mod_rewrite's environment handling is very strange.)
>
>Yah, I know. I don't particularly understand it, so I sort of punted on
>the documentation. I'll take a closer look when I get a chance.
mod_include does its environment stuff thus:
variables are added to the environment table by caling
ap_add_cgi_vars() and add_include_vars() for the standard
and module-specific variables respectively.
variables are looked up by pulling them from the environment
table r->subprocess_env.
mod_rewrite does it thus:
variables are not added to an environment table.
they are looked up by some special purpose code that matches
the variables known by mod_rewrite, and falls back to looking
in the environment table.
The former is the right way; the latter is gross. However mod_rewrite
gains some performance by its approach.
Fortunately everything you need to know about mod_rewrite's handling
of environment variables is contained in its lookup_variable function
which also happens to be easy to read.
Tony.
--
en oeccget g mtcaa f.a.n.finch
v spdlkishrhtewe y [EMAIL PROTECTED]
eatp o v eiti i d. [EMAIL PROTECTED]