
|
If you were logged in you would be able to see more operations.
|
|
|
| Resolution Date: |
26/Jul/06 11:41 AM
|
|
When using mod_python.psp, if a request is made against a .psp file which doesn't exist, then a 500 error response is returned. If PythonDebug is on, the response is of the form:
Mod_python error: "PythonHandler mod_python.psp"
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/mod_python/apache.py", line 385, in HandlerDispatch
result = object(req)
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/mod_python/psp.py", line 302, in handler
p = PSP(req)
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/mod_python/psp.py", line 111, in __init__
self.load_from_file()
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/mod_python/psp.py", line 164, in load_from_file
raise ValueError, "%s is not a file" % filename
ValueError: /Users/grahamd/Workspaces/testing/psp-1/bar.psp is not a file
Instead of returning a 500 error, mod_python.psp should identify that target of request does not exist and return a 404 (NOT_FOUND) error response instead.
Note that this will need to cope with requests against .psp_ file when PythonDebug on and SetHandler being used.
|
|
Description
|
When using mod_python.psp, if a request is made against a .psp file which doesn't exist, then a 500 error response is returned. If PythonDebug is on, the response is of the form:
Mod_python error: "PythonHandler mod_python.psp"
Traceback (most recent call last):
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/mod_python/apache.py", line 385, in HandlerDispatch
result = object(req)
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/mod_python/psp.py", line 302, in handler
p = PSP(req)
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/mod_python/psp.py", line 111, in __init__
self.load_from_file()
File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages/mod_python/psp.py", line 164, in load_from_file
raise ValueError, "%s is not a file" % filename
ValueError: /Users/grahamd/Workspaces/testing/psp-1/bar.psp is not a file
Instead of returning a 500 error, mod_python.psp should identify that target of request does not exist and return a 404 (NOT_FOUND) error response instead.
Note that this will need to cope with requests against .psp_ file when PythonDebug on and SetHandler being used. |
Show » |
made changes - 26/Jul/06 11:40 AM
| Field |
Original Value |
New Value |
|
Assignee
|
|
Graham Dumpleton
[ grahamd
]
|
made changes - 26/Jul/06 11:40 AM
|
Status
|
Open
[ 1
]
|
In Progress
[ 3
]
|
made changes - 26/Jul/06 11:41 AM
|
Resolution
|
|
Fixed
[ 1
]
|
|
Fix Version/s
|
|
3.3
[ 12310101
]
|
|
Status
|
In Progress
[ 3
]
|
Resolved
[ 5
]
|
| Repository |
Revision |
Date |
User |
Message |
| ASF |
#425710 |
Wed Jul 26 11:42:27 UTC 2006 |
grahamd |
When using mod_python.psp, if the PSP file which is the target of the request
doesn't actually exist, an apache.HTTP_NOT_FOUND server error is now returned
to the client rather than raising a ValueError exception which results in a
500 internal server error. Note that if using SetHandler and the request is
against the directory and no DirectoryIndex directive is specified which
lists a valid PSP index file, then the same apache.HTTP_NOT_FOUND server
error is returned to the client. (MODPYTHON-178)
|
| Files Changed |
MODIFY
/httpd/mod_python/trunk/lib/python/mod_python/psp.py
MODIFY
/httpd/mod_python/trunk/Doc/appendixc.tex
|
made changes - 01/May/07 10:35 AM
|
Status
|
Resolved
[ 5
]
|
Closed
[ 6
]
|
|