Re: Qs regarding AppClass -initial-env

Bill Snapper (snapper@OpenMarket.com)
Tue, 25 Mar 1997 09:12:39 -0500

Message-Id: <3337DD57.2740@openmarket.com>
Date: Tue, 25 Mar 1997 09:12:39 -0500
From: Bill Snapper <snapper@OpenMarket.com>
To: Ken Overton <kov@jhu.edu>
Subject: Re: Qs regarding AppClass -initial-env

Ken Overton wrote:
> 
> On Mar 24, 12:05pm, Rujith de Silva wrote:
> >
> > > Region /foo/bar/* {
> > >         AddCGI MY_CONFIG_URL $HEADER(url)
> > >     }
> >
> > Okay, this is much nicer, and I hadn't known this was possible.
> > Thanks.
> >
> 
> I've heard a lot of talk about server-fcgi ENV getting out of sync, so I'm
> going to belabor you all with one more questions re: this topic.
> 
> So let's say I have these 2 regions:
> 
> Region /foo/bar/* {
>         AddCGI CONFIG_DIR /configs/foobar
>         CGIPassword
> }
> Region /foo/bran/* {
>         AddCGI CONFIG_DIR /configs/foobran
>         CGIPassword
> }
> 
> Someone browsing hits /foo/bar/1.html, authenticates, now the fcgi knows
> $CONFIG_DIR is /configs/foobar.  Then they click over to /foo/bran/2.html.  Is
> there going to be an "out of sync" problem here, or will CONFIG_DIR just be
> reset to /configs/foobran, no big deal?  Sorry if this is so elementary, I have
> just heard too many worrisome reports to watch out for that.

The second URL to /foo/bran/2.html is a completely separate HTTP request
based on your description.  Therefore the regions will run as for the
prior request.  However, now the pattern matches /foo/bran/* so the
environment variable "CONFIG_DIR" is set to "/configs/foobran".  
Assuming that the browser sent the same auth header, CGIPassword will
decode this into REMOTE_USER and REMOTE_PASSWD, your Authorizer will
be able to grant access, and the request will run.

Does this clear things up?

- Bill -

-- 
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Bill Snapper           | Open Market, Inc.   | My opinions are my own,
Software Engineer      | 245 First St.       | and not necessarily
snapper@openmarket.com | Cambridge, MA 02142 | those of my employer, 
1-617-949-7365         |                     | Open Market Inc.
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++