99afea3af3
Moved to latest version 2.7.8. Added patch that fixed flags when sending location header. Added patch to cgihandler to append local directory so that relative URLs would work. Added patch to cgihandler to handle SystemExit so that pages would not ISE when sys.exit(0) was used to exit from the script. Added patch to break HTTP headers off from page correctly when CRLF and LF is used inconsistently in a page.
23 lines
826 B
Text
23 lines
826 B
Text
$NetBSD: patch-af,v 1.1 2003/12/03 09:44:10 darcy Exp $
|
|
|
|
--- lib/python/mod_python/cgihandler.py.orig 2000-12-05 22:05:37.000000000 -0500
|
|
+++ lib/python/mod_python/cgihandler.py
|
|
@@ -108,6 +108,7 @@
|
|
# thread safe, this is why we must obtain the lock.
|
|
cwd = os.getcwd()
|
|
os.chdir(dir)
|
|
+ sys.path.append (dir)
|
|
|
|
# simulate cgi environment
|
|
env, si, so = apache.setup_cgi(req)
|
|
@@ -119,7 +120,9 @@
|
|
raise apache.SERVER_RETURN, apache.HTTP_NOT_FOUND
|
|
|
|
# this executes the module
|
|
- imp.load_module(module_name, fd, path, desc)
|
|
+ try: imp.load_module(module_name, fd, path, desc)
|
|
+ except SystemExit, e:
|
|
+ if not e or not e.args or e.args[0]: raise
|
|
|
|
return apache.OK
|
|
|