[Zope] subfolder wrong absolute_url
Steve Alexander
s.alexander@lancaster.ac.uk
Tue, 16 May 2000 10:13:54 +0100
Chris Withers wrote:
>
> I agree with this but I'm not sure on what the protocols say.
> All I know is that I've had trouble with cookies on occasion with Zope
> and IE when the second / is omitted. Not problems with Netscape
> though...
>
> Are URLs which end wit ha folder supposed to end in a /
> ie: http://my.site/folder/
>
> What is the correct course of action for a Web server when it encounters
> as URL that points to a folder but doesn't end in a /?
> ie: request for http://my.site/folder
>
> Someone a while back suggested a redirect to http://my.site/folder/
> Is this correct?
This is what most filestore-based web servers do.
> What is Zope supposed to do and what does it acutally
> do? ;-)
Zope is an Object Publishing Environment, so the conventions for files
don't necessarily apply.
One route is to say that any object that may have sub-objects shall be
refered to by "url/", and any requests to "url" shall be redirected to
"url/".
I don't like this, though. The nature of acquisition is that any
object's URL can quite validly have other stuff appended to the end of
it.
The main difference is that web browsers will treat relative URLs
differently. For example, consider the link <a href="foo">, and the zope
folder http://server.com/granny/mother/dauthter.
If the browser thinks the URL is
http://server.com/granny/mother/daughter
then the resolved link will be
http://server.com/granny/mother/foo
But, if the browser things the URL is
http://server.com/granny/mother/daughter/
the resolved link will be to a subobject of daughter
http://server.com/granny/mother/daughter/foo
Zope gets around this by doing clever things with the <base
href="stuff"> tag.
Take a look at http://www.zope.org/SiteIndex
The URL does not cause the browser to redirect to SiteIndex/, but the
base tag in the page is <base href="http://www.zope.org/SiteIndex/">
Perhaps the problems Chris has observed with IE stem from IE not using
the base tag in its cookie algorithms?
--
Steve Alexander
Software Engineer
Cat-Box limited