summaryrefslogtreecommitdiff
path: root/www/ap-python
diff options
context:
space:
mode:
authordarcy <darcy@pkgsrc.org>2003-12-03 09:44:10 +0000
committerdarcy <darcy@pkgsrc.org>2003-12-03 09:44:10 +0000
commit99afea3af343193aeba3030c2f53a9596119c944 (patch)
tree0dae91b23b9069d465eb08fbea035d31f04e8c37 /www/ap-python
parentc4307def41b590cd25620071b58f3188963c4157 (diff)
downloadpkgsrc-99afea3af343193aeba3030c2f53a9596119c944.tar.gz
As discussed in the mailing list:
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.
Diffstat (limited to 'www/ap-python')
-rw-r--r--www/ap-python/Makefile12
-rw-r--r--www/ap-python/distinfo9
-rw-r--r--www/ap-python/patches/patch-ae14
-rw-r--r--www/ap-python/patches/patch-af23
-rw-r--r--www/ap-python/patches/patch-ag25
5 files changed, 74 insertions, 9 deletions
diff --git a/www/ap-python/Makefile b/www/ap-python/Makefile
index dcb455c6e9e..31c84f6dca0 100644
--- a/www/ap-python/Makefile
+++ b/www/ap-python/Makefile
@@ -1,11 +1,11 @@
-# $NetBSD: Makefile,v 1.7 2003/07/17 22:55:26 grant Exp $
+# $NetBSD: Makefile,v 1.8 2003/12/03 09:44:10 darcy Exp $
#
-DISTNAME= mod_python-2.7.6
-PKGNAME= ap-python-2.7.6
+DISTNAME= mod_python-2.7.8
+PKGNAME= ap-python-2.7.8
CATEGORIES= www
-MASTER_SITES= http://www.modpython.org/dist/
-EXTRACT_SUFX= .tgz
+MASTER_SITES= http://www.modpython.org/dist/
+EXTRACT_SUFX= .tgz
MAINTAINER= tech-pkg@NetBSD.org
HOMEPAGE= http://www.modpython.org/
@@ -17,7 +17,7 @@ USE_BUILDLINK2= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV+= PYTHON_BIN=${PYTHONBIN}
MAKE_ENV+= PYTHONBIN=${PYTHONBIN}
-PYTHON_VERSIONS_ACCEPTED= 20
+PYTHON_VERSIONS_ACCEPTED= 20 21 22 23
post-install:
${INSTALL_DATA_DIR} ${PREFIX}/share/doc/html/ap-mod_python
diff --git a/www/ap-python/distinfo b/www/ap-python/distinfo
index ad07dad9aaf..07d7b907cc3 100644
--- a/www/ap-python/distinfo
+++ b/www/ap-python/distinfo
@@ -1,8 +1,11 @@
-$NetBSD: distinfo,v 1.1.1.1 2002/02/05 21:05:58 drochner Exp $
+$NetBSD: distinfo,v 1.2 2003/12/03 09:44:10 darcy Exp $
-SHA1 (mod_python-2.7.6.tgz) = 37579015f2c2bf0c6106e8d301b8a09254221b54
-Size (mod_python-2.7.6.tgz) = 176449 bytes
+SHA1 (mod_python-2.7.8.tgz) = df92141135d75d6c6f4254cc015e712b627f539d
+Size (mod_python-2.7.8.tgz) = 176639 bytes
SHA1 (patch-aa) = e1f3c0ea969ac3a512ac9b1ca171a3691cef1189
SHA1 (patch-ab) = b79f50bed5ad6bda8f5e6aef111fbc9b9aedf943
SHA1 (patch-ac) = 1c2a5c1d961e9710561c406b60518fbfef4cb2cb
SHA1 (patch-ad) = 6ce2a424d581ebfc8763543451af566809b979a8
+SHA1 (patch-ae) = 2010c3b1522d61332bee60d052770e5addb115d1
+SHA1 (patch-af) = cd658639b5443ae63185611768b91f167bb06c7d
+SHA1 (patch-ag) = 0377336cdb8f40429d36277c23070a174a924c5b
diff --git a/www/ap-python/patches/patch-ae b/www/ap-python/patches/patch-ae
new file mode 100644
index 00000000000..9632d3a85c9
--- /dev/null
+++ b/www/ap-python/patches/patch-ae
@@ -0,0 +1,14 @@
+$NetBSD: patch-ae,v 1.1 2003/12/03 09:44:10 darcy Exp $
+
+--- lib/python/mod_python/apache.py.orig 2002-04-19 14:20:40.000000000 -0400
++++ lib/python/mod_python/apache.py
+@@ -552,6 +552,9 @@
+ elif string.lower(h) == "content-type":
+ self.req.content_type = v
+ self.req.headers_out[h] = v
++ elif h.lower() == "location":
++ self.req.status = HTTP_MOVED_TEMPORARILY
++ self.req.headers_out["location"] = v
+ else:
+ self.req.headers_out.add(h, v)
+ self.req.send_http_header()
diff --git a/www/ap-python/patches/patch-af b/www/ap-python/patches/patch-af
new file mode 100644
index 00000000000..c17e934b37a
--- /dev/null
+++ b/www/ap-python/patches/patch-af
@@ -0,0 +1,23 @@
+$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
+
diff --git a/www/ap-python/patches/patch-ag b/www/ap-python/patches/patch-ag
new file mode 100644
index 00000000000..6caf75e63f9
--- /dev/null
+++ b/www/ap-python/patches/patch-ag
@@ -0,0 +1,25 @@
+$NetBSD: patch-ag,v 1.1 2003/12/03 09:44:10 darcy Exp $
+
+--- lib/python/mod_python/apache.py.orig 2002-04-19 14:20:40.000000000 -0400
++++ lib/python/mod_python/apache.py
+@@ -529,17 +529,9 @@
+ # are headers over yet?
+ headers_over = 0
+
+- # first try RFC-compliant CRLF
+- ss = string.split(self.headers, '\r\n\r\n', 1)
+- if len(ss) < 2:
+- # second try with \n\n
+- ss = string.split(self.headers, '\n\n', 1)
+- if len(ss) >= 2:
+- headers_over = 1
+- else:
+- headers_over = 1
+-
+- if headers_over:
++ # split the headers from the body.
++ ss = string.split(self.headers.replace('\r\n', '\n'), '\n\n', 1)
++ if len(ss) == 2:
+ # headers done, process them
+ string.replace(ss[0], '\r\n', '\n')
+ lines = string.split(ss[0], '\n')