whitespace cleanup
[catagits/Catalyst-Runtime.git] / t / conf / extra.conf.in
index aaea739..48f241d 100644 (file)
@@ -1,11 +1,26 @@
+<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]
+
+        # Pass-through Authorization header for CGI/FastCGI
+        RewriteCond %{HTTP:Authorization} ^(.+)
+        RewriteRule ^(.*)$ $1 [E=HTTP_AUTHORIZATION:%1,PT]
+
         <Location /rewrite>
             RewriteEngine on
+            RewriteRule /rewrite$ /rewrite/ [PT]
             RewriteRule /rewrite/(.*) /cgi/$1
         </Location>
     </IfModule>
 <IfModule mod_fastcgi.c>
     FastCgiIpcDir @ServerRoot@/tmp/tmp
     FastCgiServer @ServerRoot@/tmp/TestApp/script/testapp_fastcgi.pl -idle-timeout 300 -processes 1
-    ScriptAlias /fastcgi/ @ServerRoot@/tmp/TestApp/script/testapp_fastcgi.pl/
-    Alias       /noslash  @ServerRoot@/tmp/TestApp/script/testapp_fastcgi.pl
+
+    # Test at a non-root location
+    ScriptAlias /fastcgi/deep/path/ @ServerRoot@/tmp/TestApp/script/testapp_fastcgi.pl/
+
+    # Test at root
+    ScriptAlias / @ServerRoot@/tmp/TestApp/script/testapp_fastcgi.pl/
+
+    <IfModule mod_rewrite.c>
+        # Fix trailing slash
+        RewriteEngine on
+        RewriteRule /fastcgi/deep/path$ /fastcgi/deep/path/ [PT]
+    </IfModule>
 </IfModule>