jorton 2004/10/24 15:04:47
Modified: perl-framework/t/conf extra.conf.in
perl-framework/t/modules rewrite.t
Log:
Test RewriteRule QSA flag.
Revision Changes Path
1.58 +3 -0 httpd-test/perl-framework/t/conf/extra.conf.in
Index: extra.conf.in
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/t/conf/extra.conf.in,v
retrieving revision 1.57
retrieving revision 1.58
diff -d -w -u -r1.57 -r1.58
--- extra.conf.in 24 Oct 2004 21:04:39 -0000 1.57
+++ extra.conf.in 24 Oct 2004 22:04:47 -0000 1.58
@@ -184,6 +184,9 @@
## Proxy pass-through
RewriteRule ^proxy.html$
http://@SERVERNAME@:@PORT@/modules/rewrite/lucky13.html [L,P]
+ ## Query-string append
+ RewriteRule ^qsa.html$
http://@SERVERNAME@:@PORT@/modules/cgi/env.pl?foo=bar [QSA,L]
+
</Directory>
### Proxy pass-through to env.pl
1.15 +5 -1 httpd-test/perl-framework/t/modules/rewrite.t
Index: rewrite.t
===================================================================
RCS file: /home/cvs/httpd-test/perl-framework/t/modules/rewrite.t,v
retrieving revision 1.14
retrieving revision 1.15
diff -d -w -u -r1.14 -r1.15
--- rewrite.t 24 Oct 2004 21:04:39 -0000 1.14
+++ rewrite.t 24 Oct 2004 22:04:47 -0000 1.15
@@ -14,7 +14,7 @@
my @url = qw(forbidden gone perm temp);
my $r;
-plan tests => @map * @num + 7, need_module 'rewrite';
+plan tests => @map * @num + 8, need_module 'rewrite';
foreach (@map) {
foreach my $n (@num) {
@@ -52,6 +52,10 @@
chomp $r;
$r =~ s/\r//g;
ok ($r eq "JACKPOT");
+
+$r = GET_BODY("/modules/rewrite/qsa.html?baz=bee");
+chomp $r;
+ok t_cmp($r, qr/\nQUERY_STRING = foo=bar\&baz=bee\n/s, "query-string append
test");
if (have_module('mod_proxy')) {
$r = GET_BODY("/modules/rewrite/proxy.html");