changeset 5553:7d27d4c3f44b

moin.fcgi: add fixer middleware for apache2/win32
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Sat, 20 Feb 2010 16:03:17 +0100
parents 6dd5073f4bf6
children 0cf43758feab
files wiki/server/moin.fcgi
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/wiki/server/moin.fcgi	Sat Feb 20 15:41:14 2010 +0100
+++ b/wiki/server/moin.fcgi	Sat Feb 20 16:03:17 2010 +0100
@@ -57,6 +57,16 @@
         return app(env, start)
     application = script_name_fixer
 
+
+# CGI with Apache2 on Windows (maybe other combinations also) has trouble with
+# URLs of non-ASCII pagenames. Use True to enable middleware that tries to fix.
+fix_apache_win32 = False  # <-- adapt here as needed
+
+if fix_apache_win32:
+    from werkzeug.contrib.fixers import PathInfoFromRequestUriFix
+    application = PathInfoFromRequestUriFix(application)
+
+
 ## Choose your server mode (threaded, forking or single-thread)
 try:
     # v-- adapt here as needed