|
[Webware-checkins] r7836 - Webware/trunk/WebKit
From: <updates@we...> - 2009-03-20 16:41
|
Author: chrisz
Date: Fri Mar 20 10:41:36 2009
New Revision: 7836
Modified:
Webware/trunk/WebKit/HTTPRequest.py
Log:
For the psp-handler, instead of using the base directory of the servlet as the servlet path, use the document root as the servlet path, and put the rest of the path into the path info. This should make things even more compatible to the normal webkit-handler.
Modified: Webware/trunk/WebKit/HTTPRequest.py
==============================================================================
--- Webware/trunk/WebKit/HTTPRequest.py (original)
+++ Webware/trunk/WebKit/HTTPRequest.py Fri Mar 20 10:41:36 2009
@@ -73,14 +73,13 @@
# this is set when the servlet is a webserver file that shall
# be handled without context (e.g. when the psp-handler is used)
self._fsPath = self.fsPath()
- # strip the servlet name from servletPath in this case
- i = self._servletPath.rfind('/')
- self._servletPath = i >= 0 and self._servletPath[:i+1] or ''
+ # treat this lie a context at the webserver document root
+ self._pathInfo = self._servletPath + self._pathInfo
+ self._servletPath = ''
if env.has_key('REQUEST_URI'):
self._uri = env['REQUEST_URI']
# correct servletPath if there was a redirection
if not (self._uri + '/').startswith(self._servletPath + '/'):
- print "CORRECT",self._uri, self._servletPath
i = self._uri.find(self._pathInfo)
self._servletPath = i >= 0 and self._uri[:i] or ''
else:
@@ -408,7 +407,7 @@
"""The filesystem path of the request according to the webserver."""
fspath = self.adapterFileName()
if not fspath:
- fspath = self.servletPath()
+ fspath = self.adapterName()
docroot = self._environ['DOCUMENT_ROOT']
fspath = os.path.join(docroot, fspath)
return fspath
|
| Thread | Author | Date |
|---|---|---|
| [Webware-checkins] r7836 - Webware/trunk/WebKit | <updates@we...> |