> -----Original Message-----
> From: Stas Bekman [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, August 01, 2001 10:50 AM
> To: Geoffrey Young
> Cc: Chris Rodgers; [EMAIL PROTECTED]
> Subject: RE: Bug??
> 
[snip]
> >
> > of course, that won't work with PerlSetupEnv Off - maybe use
> > $r->subprocess_env('https') instead :)
> 
> Are you sure? I think with PerlSetupEnv Off you don't get the 
> usual CGI
> env vars set, is HTTPS one of these?

my take on this is that mod_perl uses two Apache C routines:
ap_add_common_vars and ap_add_cgi_vars to set up the environment using the
contents of the subprocess_env table.

the former sets up things like REMOTE_PORT and translates the incoming
headers into HTTP_*.  the latter adds CGI spec variables to the
subprocess_env table, like GATEWAY_INTERFACE.  in both cases, all that is
happening is that the subprocess_env table is populated.  it is up to
mod_cgi (which uses an ap_* call) or mod_perl (which uses its own) to move
the contents of subprocess_env into %ENV.

HTTPS is actually set up by mod_ssl using subprocess_env and relies on
mod_cgi or mod_perl to populate %ENV.  PerlSetupEnv supresses this.

at any rate, my analysis may be slightly off, but in practice setting
PerlSetupEnv Off hides $ENV{HTTPS} but it is still there in
$r->subprocess_env.

--Geoff

Reply via email to