Given an object is accessed by /VirtualHostBase/http/example.com:80/VirtualHostRoot/_vh_foo/folder/doc
1) doc.absolute_url()
Returns the full URL of doc including protocol and host. e.g. http://example.com/foo/folder/doc
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
Comments:
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.
Stefan
-- 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]
http://mail.zope.org/mailman/listinfo/zope-dev
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )