httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Ho <and...@tellme.com>
Subject Re: HTTP_REFERER in mod_ext_filter
Date Fri, 11 Jul 2003 07:42:31 GMT
Hello,

CS>Currently, mod_ext_filter doesn't seem to grab all of the environment
CS>variables. One that's notably missing is HTTP_REFERER. But, I can't
CS>figure out where this env variable is set. I searched thru the source
CS>files (*.c and *.h) and the only reference I found was in
CS>modules/ssl/ssl_engine_vars.c and modules/mappers/mod_rewrite.c.

The various HTTP_* environment variables that CGI scripts see are part of
the CGI specification; they correspond specifically to any HTTP request
headers. These are set by ap_add_common_vars() in server/util_script.c.  

You didn't find HTTP_REFERER specifically, because ap_add_common_vars()
just cycles through all request headers (except Authorization and
Proxy-Authorization, for security reasons) and sets appropriately named
environment variables.

There is another function, ap_add_cgi_vars(), in server/util_script.c
which sets REQUEST_URI, SCRIPT_NAME, and all the other CGI variables we
are accustomed to. It looks like mod_ext_filter calls ap_add_cgi_vars()
but not ap_add_common_vars().

Humbly,

Andrew

----------------------------------------------------------------------
Andrew Ho               http://www.tellme.com/       andrew@tellme.com
Engineer                    1-800-555-TELL          Voice 650-930-9062
Tellme Networks, Inc.                                 Fax 650-930-9101
----------------------------------------------------------------------



Mime
View raw message