httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adrian Hosey <aho...@systhug.com>
Subject ap_add_common_vars() clobbers existing values?
Date Thu, 02 Nov 2000 20:10:37 GMT

I was originally trying to use SetEnv to override the usual value of the
SERVER_NAME (and HTTP_HOST) variables. We have multiple backend servers
muxed by a frontend proxy, so I want CGIs running on the backend machines
to all see the same hostname in their environment, right?

I found that even though SetEnv was setting SERVER_NAME to what I wanted,
the call to ap_add_common_vars() in mod_cgi.c was clobbering the existing
value with its new value (where the new value is the one I'm trying to
override!) This is because of the use of ap_overlap_tables() right? This
seems counterintuitive to me. Was there a deliberate decision to give the
newer values precedence or did it just happen to be coded that way? Can I
make the case that existing values should get precedence?

Thanks,

	- A

-- 
http://web.systhug.com/
Beware of bugs in the above code; I have only proved it correct, not tried
it. - Donald Knuth






Mime
View raw message