[albatross-users] 1.10pre2 random app breakage
Dave Cole
djc at object-craft.com.au
Mon Jul 7 23:09:05 EST 2003
> Hi,
> Using 1.10pre2, random apps run with mod_python or cgi are potentiall
> broken. The base_url patch I submitted was not quite correct although
> it seemed to work ok with 1.10pre1. Attached is another base_url
> patch, based on the 1.10pre2 code, which should fix things.
>
> Cheers, Matt
>
> --
> Matt Goodall, Pollenation Internet Ltd
> w: http://www.pollenationinternet.com
> e: matt at pollenationinternet.com
>
> diff -ru albatross-1.10pre2-original/albatross/app.py albatross-1.10pre2/albatross/app.py
> --- albatross-1.10pre2-original/albatross/app.py 2003-07-05 08:52:40.000000000 +0100
> +++ albatross-1.10pre2/albatross/app.py 2003-07-07 11:08:48.000000000 +0100
> @@ -221,11 +221,12 @@
> def __init__(self, base_url):
> ResourceMixin.__init__(self)
> self.register_tagclasses(*tags.tags)
> - # Use a base_url of '/' if not provided
> - if base_url:
> - self.__base_url = base_url
> - else:
> + # Always append a '/' to the base_url if it is missing
> + self.__base_url = base_url
> + if not self.__base_url:
> self.__base_url = '/'
> + elif self.__base_url[-1] != '/':
> + self.__base_url = self.__base_url + '/'
>
> def run(self, req):
> '''Process a single browser request
Applied.
- Dave
--
http://www.object-craft.com.au
More information about the Albatross-users
mailing list