base_url discovery (was Re: [albatross-users] Upgrade problems to albatross 1.10pre2)

Matt Goodall matt at pollenation.net
Thu Jul 10 02:13:16 EST 2003


On Wed, 2003-07-09 at 14:04, Dave Cole wrote:
> I have been wondering if it is possible for the application to
> discover the base_url from the web server.  It certainly is using CGI,
> so probably is with FastCGI too,

As you pointed out, neither of these should be a problem.

> but I am not so sure about mod_python.

The problem with this is the one I hit the other day when using
mod_rewrite. The uri that Albatross sees is the rewritten uri which can
be completely different to what is typed into the browser url bar.

Having said that, mod_python has req.the_request which is the http
request header, i.e. 'GET /~matt/simple/app.py/1/2/3 HTTP/1.1'. We may
be able to make use of that but I haven't looked into it anymore.

> I am certain the BaseHTTPServer cannot supply enough
> information.

No, but it probably doesn't need to as the application is always mounted
at '/'.

Cheers, Matt

-- 
Matt Goodall, Pollenation Internet Ltd
w: http://www.pollenation.net
e: matt at pollenation.net



More information about the Albatross-users mailing list