[Zope] - Authorization aside...

Jim Fulton jim@digicool.com
Thu, 21 Jan 1999 14:57:15 +0000


Amos Latteier wrote:
> 
> At 01:30 PM 1/19/99 +0000, you wrote:
> >Magnus Lie Hetland wrote:
> >>
> >> .. I still get problems with proxying... Whenever I have a relative link
> >> somewhere in my Zope pages, they always end up on the server machine, and
> >> not the proxy, because Zope insists (naturally) on using the server
> >> machine as base URL. Now... Is there any way I can change the base URL?
> >> (There should be...) Otherwise... Will there be in the future?
> >>
> >> And as for authorization... Does anyone know how to use the
> >> proxying/rewriting-mechanisms of Apache to fool browsers into sending the
> >> Authorization from the proxy to the real server as well?
> >
> >I'm going to try and find some time to work on this tomorrow.
> >Hopefully, I'll make some kind of proposal tomorrow afternoon.
> 
> Jim, what do you have in mind?

I didn't get time to work on this yesterday. Waaaaa :(

Here are some initial thoughts:

  - ZPublisher needs to do the "right thing" with the 
    HTTP 1.1 Host header.  That is, by default, Zope
    should make sure that it's base URL is consistent 
    with HTTP_HOST.

  - There should probably be a way to specify BASE1.
    Maybe if Zope sees an environment variable Z_BASE1, 
    it should use that as the "script name" and basis for
    other variables.  This variable could be set in a 
    PCGI file, or via server rewrite rules.

  - There should be a way to specify that some objects
    should be traversed prior to processing PATH_INFO.
    For example, suppose the is a Zope running at:

       http://foo.com/

    and that there is a special variable, Z_PREFIX set to
    "bar.com".  Then the URL:

       http://foo.com/Sales

    would go to the Sales subobject of the "bar.com" top-level
    object in the Zope.

    In addition, there should probably be a Z_PREFIX_VAR
    that gives the name of another variable. So maybe you could do
    something like:

       Z_PREFIX_VAR=HTTP_HOST

    then you could set things up so that URLs using virtual hosts:

       http://spam.com/Sales
    
    and:

       http://bar.com/Sales

    actually went to the Sales subfolders of spam.com and bar.com
    top-level folders of a common Zope installation.

I wonder how much this would help?

--
Jim Fulton           mailto:jim@digicool.com
Technical Director   (540) 371-6909              Python Powered!
Digital Creations    http://www.digicool.com     http://www.python.org

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.