jorton 2004/10/24 13:45:37
Modified: perl-framework/t/modules rewrite.t perl-framework/t/conf extra.conf.in Log: Add test for mod_rewrite reverse proxy vs QUERY_STRING regression in 1.3.32. Revision Changes Path 1.12 +10 -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.11 retrieving revision 1.12 diff -d -w -u -r1.11 -r1.12 --- rewrite.t 12 Oct 2004 13:53:41 -0000 1.11 +++ rewrite.t 24 Oct 2004 20:45:37 -0000 1.12 @@ -14,7 +14,7 @@ my @url = qw(forbidden gone perm temp); my $r; -plan tests => @map * @num + 4, need_module 'rewrite'; +plan tests => @map * @num + 5, need_module 'rewrite'; foreach (@map) { foreach my $n (@num) { @@ -59,4 +59,13 @@ ok t_cmp($r, "JACKPOT", "request was proxied"); } else { skip "Skipping rewrite to proxy; no proxy module."; +} + +if (have_module('mod_proxy') && have_module('mod_cgi')) { + # broken in 1.3.32 + $r = GET_BODY("/modules/rewrite/proxy2/env.pl?fish=fowl"); + chomp $r; + ok t_cmp($r, qr/QUERY_STRING = fish=fowl\n/s, "QUERY_STRING passed OK"); +} else { + skip "Skipping rewrite QUERY_STRING test; missing proxy or CGI module"; } 1.56 +4 -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.55 retrieving revision 1.56 diff -d -w -u -r1.55 -r1.56 --- extra.conf.in 19 Oct 2004 15:02:25 -0000 1.55 +++ extra.conf.in 24 Oct 2004 20:45:37 -0000 1.56 @@ -185,6 +185,10 @@ RewriteRule ^proxy.html$ http://@SERVERNAME@:@PORT@/modules/rewrite/lucky13.html [L,P] </Directory> + + ### Proxy pass-through to env.pl + RewriteRule ^/modules/rewrite/proxy2/(.*)$ http://@SERVERNAME@:@PORT@/modules/cgi/$1 [L,P] + </IfModule> ##