[albatross-users] Possible bug

Matt Goodall matt at pollenation.net
Thu Jun 19 11:11:13 EST 2003


Hi,

Before I forget, I'm using 1.10pre1.

I've recently been having lots of fun getting a standalone HTTP server
going. In general things are going ok although I haven't done anything
for file uploads yet.

However, I *think* I may have found a bug when a random application is
mounted as '/' on the server, as is always the case with my standalone
server. In this case I would expect to set the Application's base_url to
'/' or perhaps '' (zero length string) but both cause problems:

  * If base_url is '/' then RandomPageModuleMixin.load_page()
    fails as it always appends '/' to base_path.
  * If base_url is '' then AppContext.redirect_url() fails
    because new_base ends up as an empty string and so
    new_base[-1] raises an exception.

There are a few possible solutions but I suspect the best is to ensure
Application.__base_url always ends in '/' and to change
RandomPageModuleMixin.load_page() so that it does not append the '/'.

Hope this helps.

Cheers, Matt

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



More information about the Albatross-users mailing list