# HG changeset patch # User paulb # Date 1093806634 0 # Node ID ec75746f6e64e70ac81acc7e5dd7841e210e368d # Parent 49f07db0546ead99019950af346d0f7b7fb30afc [project @ 2004-08-29 19:10:34 by paulb] Fixed get_path_info for JavaServlet and Webware, although Webware 0.8.1 and earlier does not really support it anyway. diff -r 49f07db0546e -r ec75746f6e64 WebStack/JavaServlet.py --- a/WebStack/JavaServlet.py Sun Aug 29 19:09:25 2004 +0000 +++ b/WebStack/JavaServlet.py Sun Aug 29 19:10:34 2004 +0000 @@ -195,7 +195,7 @@ Returns the entire path from the request minus the query string. """ - return self.request.getServletPath() + return self.request.getContextPath() + self.request.getServletPath() + self.get_path_info() def get_path_info(self): @@ -204,7 +204,7 @@ handling the current request) from the request. """ - return self.request.getPathInfo() + return self.request.getPathInfo() or "" def get_query_string(self): diff -r 49f07db0546e -r ec75746f6e64 WebStack/Webware.py --- a/WebStack/Webware.py Sun Aug 29 19:09:25 2004 +0000 +++ b/WebStack/Webware.py Sun Aug 29 19:10:34 2004 +0000 @@ -138,7 +138,12 @@ handling the current request) from the request. """ - return self.trans.request().extraURLPath() + path_info = self.trans.request().pathInfo() + context_name = self.trans.request().contextName() + if path_info.startswith(context_name): + return path_info[len(context_name):] + else: + return path_info def get_query_string(self):