OUCH.!
Thanks for catching this, Tripp.
I've commited a fix in CVS, but if you want to stick it in your local copy, here
it is.
This is a bug only for mod_python requests that are mapped to *.psp.
In HTTPRequest.py, line 327, in fsPath, add the if self._environ... line from the
snippet below.
def fsPath(self):
""" The filesystem path of the request, using the webserver's docroot"""
docroot = self._environ['DOCUMENT_ROOT']
requri = self._environ['REQUEST_URI'][1:]#strip leading /
if self._environ['QUERY_STRING']:
qslength = len(self._environ['QUERY_STRING'])+1
requri = requri[:-qslength] ##pull off the query string and the ?-mark
fspath = os.path.join(docroot,requri)
return fspath
Thanks for catching this, and let me know if you have any other problems.
Jay
Tripp Lilley wrote:
> Invoking a plain old PSP page with parameters tacked onto the end of the
> URL gives me this:
>
> BEGIN REQUEST
> Sat Oct 14 01:11:43 2000
> receiving request from <socket object, fd=7, family=2, type=1, protocol=0>
> received 1302 bytes
> request has keys: format, time, environ, input
> request uri = /foci/foci/view_petition.psp?count=0
> [Sat Oct 14 01:11:43 2000] [error] WebKit: Error while executing script
> None
> Traceback (innermost last):
> File "Application.py", line 280, in dispatchRequest
> self.handleGoodURL(transaction)
> File "Application.py", line 371, in handleGoodURL
> self.createServletInTransaction(transaction)
> File "Application.py", line 690, in createServletInTransaction
> cache = {
> File "/var/tmp/python-root/usr/lib/python1.5/posixpath.py", line 140, in
> getmtime
> st = os.stat(filename)
> OSError: [Errno 2] No such file or directory:
> '/home/httpd/html/foci/foci/view_petition.psp?count=0'
> connection closed.
> 0.04 secs
> END REQUEST
>
> Which suggests that the appserver is not properly splitting the fields out
> from the URL and parsing the filename...
>
> --
> Fun-Loving * Tripp Lilley * http://stargate.eheart.sg505.net/~tlilley/
> ------------------------------------------------------------------------------
> "That's weak sh*t, from a weak mind, and a weak mind creates weak rhymes.
> You ain't never kicked knowledge one time."
>
> - Ice-T, "The Syndicate"
>
> _______________________________________________
> Webware-discuss mailing list
> Webware-discuss@...
> http://lists.sourceforge.net/mailman/listinfo/webware-discuss
|