|
Damjan
arhiv at freemail.org.mk
Mon Jan 1 21:54:25 EST 2001
Here is a small patch for mod_python.publisher, that instead of raising an
error when there is no PATH_INFO, it substitutes a default PATH_INFO.
(I choose index_html, perhaps a diferent default method can be chosen)
That way when we call a script without specifying a method, the method
index_html is called.
--- publisher.py.old Mon Jan 1 21:48:04 2001
+++ publisher.py Mon Jan 1 21:47:39 2001
@@ -81,7 +81,7 @@
# get the path PATH_INFO (everthing after script)
if not _req.subprocess_env.has_key("PATH_INFO"):
- raise apache.SERVER_RETURN, apache.HTTP_NOT_FOUND
+ _req.subprocess_env["PATH_INFO"]="/index_html"
func_path = _req.subprocess_env["PATH_INFO"][1:] # skip fist /
func_path = string.replace(func_path, "/", ".")
--
Damjan Georgievski | Дамјан Георгиевски
Skopje, Macedonia | Скопје, Македонија
|