On Jun 25, 2004, at 4:49 PM, David Wheeler wrote:

Hrm, nope. I just installed the latest on another box and the redirection still works properly. Odd...

So let's introduce some tests to see where it happens, hrm??

diff -Naur old/t/conf/extra.conf.in new/t/conf/extra.conf.in
--- old/t/conf/extra.conf.in    Tue Sep 30 14:08:16 2003
+++ new/t/conf/extra.conf.in    Fri Jun 25 19:26:16 2004
@@ -1,4 +1,6 @@
 #this file will be Include-d by @ServerRoot@/httpd.conf

#the subclass inside t/TEST added the authname and allowed_users variables
-
+<IfModule mod_alias.c>
+ Redirect /redirect http://@ServerName@/redirected/
+</IfModule>
diff -Naur old/t/redirect.t new/t/redirect.t
--- old/t/redirect.t Wed Dec 31 17:00:00 1969
+++ new/t/redirect.t Fri Jun 25 19:34:41 2004
@@ -0,0 +1,23 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestRequest;
+
+plan tests => 6, have_module('mod_alias.c') && &have_lwp;
+
+my $url = '/redirect';
+
+# Allow request to be redirected.
+ok my $res = GET $url;
+ok ! $res->is_redirect;
+
+# Don't let request be redirected.
+ok $res = GET($url, redirect_ok => 0);
+ok $res->is_redirect;
+
+# Allow no more requests to be redirected.
+Apache::TestRequest::user_agent(reset => 1,
+ requests_redirectable => 0);
+ok $res = GET $url;
+ok $res->is_redirect;


Regards,

David



Reply via email to