[Zope] base href

Ian Bicking ianb at colorstudy.com
Sun Nov 30 18:10:30 EST 2003


On Nov 30, 2003, at 3:44 PM, Ulrich Wisser wrote:
> LocalFS objects are no real Zope objects. Thus they do not
> go through the Zope rendering engine. That said, it means it
> is your job to make all links work.

This is the issue -- they do appear to go through the rendering engine 
(well, specifically HTTPResponse, which is where base href is added).  
LocalFS objects are translated into real Zope objects as well, at its 
simplest into File objects (but it can also be DTML objects or other 
classes, based on configuration).  But that wouldn't really matter, as 
it's not File that is creating the base href.

In this case we have some files on the disk that we want Zope to 
protect with a login.  All the links in the files are relative.  So we 
mount the files in /static, and access /static/visitors.html -- the 
base href is then set to "/static/visitors.html/", which is obviously 
incorrect (it should be simply "/static/", or preferably no base href 
at all).

(Ultimately we've solved this by taking the files out of Zope, and 
using a CGI script to handle authentication)

--
Ian Bicking | ianb at colorstudy.com | http://blog.ianbicking.org




More information about the Zope mailing list