patch for pyblosxom
Fredrik Steen <[email protected]>
| Newsgroups | gmane.comp.web.pyblosxom.user |
|---|---|
| Message-ID | <[email protected]> |
Hi there, Here is a patch for pyblosxom making it possible to use the "path" stuff with mod_python. problem (under mod_python): http://www.example.com/pb/ (pyblosxom under mod_python) http://www.example.com/pb/computer/debian?flav=something = 404 What this patch does is that it depending if form['path'] is set it will use that instead of PATH_INFO wich is not set when running pyblosxom under mod_python. solved: http://www.example.com/pb/?path=/computer/debian&flav=something The patch will work with the standard format using PATH_INFO also no change there. Hope it helps. -- .Fredrik Steen - http://www.stone.nu/ -
pyblosxom-path-patch.diff
(text/plain, 635 B)
--- pyblosxom.py 2003-07-29 05:38:22.000000000 +0200
+++ pyblosxom-stone.py 2003-09-03 10:49:59.000000000 +0200
@@ -172,9 +172,13 @@ class PyBlosxom:
data['pi_yr'] = ''
data['pi_mo'] = ''
data['pi_da'] = ''
-
- if pyhttp.get('PATH_INFO', ''):
- path_info = pyhttp['PATH_INFO'].split('/')
+
+ if form.has_key('path'):
+ path_info = form['path'].value.split('/')
+ else:
+ if pyhttp.get('PATH_INFO', ''):
+ path_info = pyhttp['PATH_INFO'].split('/')
+
path_info = [x for x in path_info if x != '']
data['path_info'] = list(path_info)
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQE/Va7H2pHue6WOFk8RAuGJAKCjl1qsGbAhXUtiv/M26k9v3C4EvACfYlrL C+Ely4TjZ/ZwlltJfitikKs= =5jMH -----END PGP SIGNATURE-----