PATH_TRANSLATED delimted with backslash ?
I just tried out on Windows 98 a Zope application that was developed on Linux. Everything worked fine, except that REQUEST.PATH_TRANSLATED changed to be delimited by backslashes on Windows 98, whereas it is delimited by slashes on Linux. This caught me out, as I'd been using it raw in an external method: obj = self.restrictedTraverse(REQUEST.PATH_TRANSLATED) This stopped working when I tried the software on Windows. Bug or feature? -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
From: "Steve Alexander" <steve@cat-box.net>
obj = self.restrictedTraverse(REQUEST.PATH_TRANSLATED)
This stopped working when I tried the software on Windows.
Bug or feature?
I'm not sure, but I'm *very* curious what you're trying to accomplish with this code. A better equivalent would probably be obj = self.getPhysicalRoot().restrictedTraverse(REQUEST.steps). Cheers, Evan @ digicool & 4-am
Evan Simpson wrote:
From: "Steve Alexander" <steve@cat-box.net>
obj = self.restrictedTraverse(REQUEST.PATH_TRANSLATED)
This stopped working when I tried the software on Windows.
Bug or feature?
I'm not sure, but I'm *very* curious what you're trying to accomplish with this code. A better equivalent would probably be obj = self.getPhysicalRoot().restrictedTraverse(REQUEST.steps).
I'm producing a set of breadcrumb-style links. I want to test whether the object at the requested URL has the attribute "breadcrumbs_text", because if so, that text should be used instead of the results of my breadcrumbs algorithm. I have an object that is a DTML Document. It has the property "breadcrumbs_text" set. My breadcrumbs external method is called from standard_html_header. When I look at the DTML Document through the web, the "self" object passed to the breadcrumbs external method is the folder that contains the DTML Document. (I thought that should only be the case for DTML Methods!) So, in order to check the existence of the attribute "breadcrumbs_text", I needed to get hold of the object that was requested. I'm not using virtual hosting for this project (although I will be later), so I threw REQUEST.PATH_TRANSLATED in there as I could see from inspecting REQUEST that it would give me what I needed. It looks like using REQUEST.steps is better because it will continue to work with virtual hosting. I'll change the method to use REQUEST.steps. Thanks. -- Steve Alexander Software Engineer Cat-Box limited http://www.cat-box.net
participants (2)
-
Evan Simpson -
Steve Alexander