Can someone reply to this. I depend on it and it's getting old now. --> Friday, August 29, 2003, 12:09:38 PM, [EMAIL PROTECTED] wrote:
> req.serverSidePath accepts relative site paths fine, but does not work > with an absolute site path. > [snips] > res.write(req.serverSidePath('/index.psp')+'<br>') > # it returns '\index.psp' instead of the expected absolute path This is my fix... (with tabs to match HTTPRequest.py) # --------------------------------------------------------------------- # kaishaku fix def serverSidePath(self, path=None): """ Returns the absolute server-side path of the request. If the optional path is passed in, then it is joined with the server side directory to form a path relative to the object. """ if not hasattr(self, '_serverSidePath'): app = self._transaction.application() self._serverSidePath, self._serverSideContextPath, self._contextName = app.serverSideInfoForRequest(self) if path: if path[0]=='/' or path[0]=='\\': return os.path.normpath(self._environ['DOCUMENT_ROOT']+path) else: return os.path.normpath(os.path.join(os.path.dirname(self._serverSidePath), path)) else: return self._serverSidePath # --------------------------------------------------------------------- -Kai ------------------------------------------------------- This SF.net email is sponsored by OSDN developer relations Here's your chance to show off your extensive product knowledge We want to know what you know. Tell us and you have a chance to win $100 http://www.zoomerang.com/survey.zgi?HRPT1X3RYQNC5V4MLNSV3E54 _______________________________________________ Webware-discuss mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/webware-discuss