[Zope] Zope URLS
Rik Hoekstra wrote: > so what is the use of the /? Couldn't all Zope URLs end without a /? I'm afraid this is the whole problem and it's caused by relative urls. Say you're at http://host/x/y where y is a container that renders index_html to be displayed, and in that index_html you haev a ref: b Now what you mean by that is http://host/x/y/b but because there's no / on the end, you actually get http://host/x/b How Zope handles this is by sticking in that godawful base tag: http://hosy/x/y/"> which makes relative URLs work properly. BUT, from what Gregor said earlier is a 'non-standard' way of doing it: > traditionally in a static web server, if you try > to access a URL like 'http://host/xyz' (without trailing slash), the server > will return you an error '301 Moved permanently' and will point you to the > new location 'http://host/xyz/ which is why I suggested all Zope URLs should end in / as all zope objects can be containers in the 'traditional' sense. Or we could just re-write HTTP to provide more useful information in the first place ;-) cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope URLS (was re: WebObjects)
On Thu, 8 Jun 2000, Rik Hoekstra wrote: > so what is the use of the /? Couldn't all Zope URLs end without a /? This effectiveley stops all websuckers. Oleg.(All opinions are mine and not of my employer) Oleg Broytmann Foundation for Effective Policies [EMAIL PROTECTED] Programmers don't die, they just GOSUB without RETURN. ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Zope URLS (was re: WebObjects)
>Gregor Hoffleit wrote: >> Regarding wget: >> >> AFAICS, the problem is that traditionally in a static web server, if you try >> to access a URL like 'http://host/xyz' (without trailing slash), the server >> will return you an error '301 Moved permanently' and will point you to the >> new location 'http://host/xyz/'. Zope instead (if 'xyz' is a folder and >> there's a document 'xyz/index_html') immediately returns the rendered >> index_html if you request 'http://host/xyz'. >> >> Now whenever the 301 to the URL with a trailing slash happens, wget takes >> this as a hint that this path must have been a directory, and saves the >> result as index.html. With Zope, wget doesn't get this hint. >> >> Reading this again, I wonder if this qualifies as a bug in Zope, or is there >> a good reason for this behavior ? > >It's not so much a bug as a complication caused by the fact that Zope >isn't a filesystem server, but an orb presented through the web (correct >me if I'm slightly out ;-) > >For example http://host/x/y/z > >Could be: >-A container object z (which should have a / after it?) >-A dtml-document in folder /x/y/ >-The result of executing the z method on the y object in the /x/ folder. >-The result of executing the z method on the result of executing the y >method on the x object in the root folder. > >I'm sure acquisition adds some more options/confusions to this... ;-) > >So, that's the problem, I don't know what the solution is :( > >I do think there must be a better way than Zope's kludgey BASE tag >thing. >Maybe all Zope URLs should end in a / ? so what is the use of the /? Couldn't all Zope URLs end without a /? > >Quite radical, but maybe the most sensible and least confusing? :/ > Rik ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
[Zope] Zope URLS (was re: WebObjects)
Gregor Hoffleit wrote: > Regarding wget: > > AFAICS, the problem is that traditionally in a static web server, if you try > to access a URL like 'http://host/xyz' (without trailing slash), the server > will return you an error '301 Moved permanently' and will point you to the > new location 'http://host/xyz/'. Zope instead (if 'xyz' is a folder and > there's a document 'xyz/index_html') immediately returns the rendered > index_html if you request 'http://host/xyz'. > > Now whenever the 301 to the URL with a trailing slash happens, wget takes > this as a hint that this path must have been a directory, and saves the > result as index.html. With Zope, wget doesn't get this hint. > > Reading this again, I wonder if this qualifies as a bug in Zope, or is there > a good reason for this behavior ? It's not so much a bug as a complication caused by the fact that Zope isn't a filesystem server, but an orb presented through the web (correct me if I'm slightly out ;-) For example http://host/x/y/z Could be: -A container object z (which should have a / after it?) -A dtml-document in folder /x/y/ -The result of executing the z method on the y object in the /x/ folder. -The result of executing the z method on the result of executing the y method on the x object in the root folder. I'm sure acquisition adds some more options/confusions to this... ;-) So, that's the problem, I don't know what the solution is :( I do think there must be a better way than Zope's kludgey BASE tag thing. Maybe all Zope URLs should end in a / ? Quite radical, but maybe the most sensible and least confusing? :/ cheers, Chris ___ Zope maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )