After causing all this noise, let me summarize what I now understand is the intended behavior of Zope's URL methods.

Given an object is accessed by

1) doc.absolute_url()

 Returns the full URL of doc including protocol and host.

2) doc.absolute_url(relative=1)

 Returns the path of doc, relative to the virtual root.
 e.g. folder/doc

3) REQUEST.BASEPATH1 + '/' + doc.absolute_url(1)

 Results in the absolute path of doc, starting at the server root.
 e.g. /foo/folder/doc


ad 2) This may or may not be RFC-2396 compliant, I must admit I fail to parse the RFC here. It certainly appears necessary for b/w compatibility at least.

ad 3) It may still be a good idea to add an API method for this (e.g. 'absolute_path') like I proposed in February (#809). If only to increase the visibility of this requirement. I understand that it may be too late for 2.7.

Whoever is going to unroll the fix, please also adapt the tests in Products/SiteAccess/tests.

Finally, please accept my apologies for the tone of some replies; I do certainly need a vacation.


-- The time has come to start talking about whether the emperor is as well dressed as we are supposed to think he is. /Pete McBreen/

Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - )

Reply via email to