Use mod_rewrite to fix trailing slash issue with CGI test
[catagits/Catalyst-Runtime.git] / t / conf / extra.conf.in
index fff041d..1896441 100644 (file)
@@ -1,11 +1,22 @@
+<IfDefine !APACHE1>
+    # Needed to pass some %2F tests
+    AllowEncodedSlashes on
+</IfDefine>
+
 # CGI
 <IfModule @CGI_MODULE@>
     ScriptAlias /cgi/ @ServerRoot@/tmp/TestApp/script/testapp_cgi.pl/
 
     # REDIRECT_URL test
     <IfModule mod_rewrite.c>
+        # Fix trailing slash on /cgi
+        # one CGI test will fail if you don't have mod_rewrite enabled
+        RewriteEngine on
+        RewriteRule /cgi$ /cgi/ [PT]
+
         <Location /rewrite>
             RewriteEngine on
+            RewriteRule /rewrite$ /rewrite/ [PT]
             RewriteRule /rewrite/(.*) /cgi/$1
         </Location>
     </IfModule>