httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jor...@apache.org
Subject svn commit: r952445 - in /httpd/test/framework/trunk/t: apache/pr43939.t conf/extra.conf.in htdocs/modules/deflate/ssi/default.html htdocs/modules/deflate/ssi/ssi2.shtml
Date Mon, 07 Jun 2010 21:18:05 GMT
Author: jorton
Date: Mon Jun  7 21:18:05 2010
New Revision: 952445

URL: http://svn.apache.org/viewvc?rev=952445&view=rev
Log:
- add test case for PR 43939, a variant of PR 17629

Added:
    httpd/test/framework/trunk/t/apache/pr43939.t
    httpd/test/framework/trunk/t/htdocs/modules/deflate/ssi/default.html
    httpd/test/framework/trunk/t/htdocs/modules/deflate/ssi/ssi2.shtml
Modified:
    httpd/test/framework/trunk/t/conf/extra.conf.in

Added: httpd/test/framework/trunk/t/apache/pr43939.t
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/apache/pr43939.t?rev=952445&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/apache/pr43939.t (added)
+++ httpd/test/framework/trunk/t/apache/pr43939.t Mon Jun  7 21:18:05 2010
@@ -0,0 +1,47 @@
+use strict;
+use warnings FATAL => 'all';
+
+use Apache::Test;
+use Apache::TestUtil;
+use Apache::TestRequest;
+
+plan tests => 4, need [qw(cgi include deflate case_filter)];
+my $inflator = "/modules/deflate/echo_post";
+
+my @deflate_headers;
+push @deflate_headers, "Accept-Encoding" => "gzip";
+
+my @inflate_headers;
+push @inflate_headers, "Content-Encoding" => "gzip";
+
+# The SSI script has the DEFLATE filter applied.
+# The SSI includes directory index page.
+# The directory index page is processed with a fast internal redirect.
+
+# The test is that filter chain survives across the redirect.
+
+my $uri = "/modules/deflate/ssi/ssi2.shtml";
+
+my $content = GET_BODY($uri);
+
+my $expected = "begin-default-end\n";
+
+ok t_cmp($content, $expected);
+
+my $r = GET($uri, @deflate_headers);
+
+ok t_cmp($r->code, 200);
+
+my $renc = $r->header("Content-Encoding") || "";
+
+ok t_cmp($renc, "gzip", "response was gzipped");
+
+if ($renc eq "gzip") {
+    my $deflated = POST_BODY($inflator, @inflate_headers,
+                             content => $r->content);
+    
+    ok t_cmp($deflated, $expected);
+}
+else {
+    skip "response not gzipped";
+}

Modified: httpd/test/framework/trunk/t/conf/extra.conf.in
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/conf/extra.conf.in?rev=952445&r1=952444&r2=952445&view=diff
==============================================================================
--- httpd/test/framework/trunk/t/conf/extra.conf.in (original)
+++ httpd/test/framework/trunk/t/conf/extra.conf.in Mon Jun  7 21:18:05 2010
@@ -465,7 +465,7 @@ LimitRequestFields    32
 
         <Directory @SERVERROOT@/htdocs/modules/deflate/ssi>
             Options +Includes
-            DirectoryIndex shtml
+            DirectoryIndex default.html
             AddOutputFilter INCLUDES shtml
             SetOutputFilter DEFLATE
         </Directory> 

Added: httpd/test/framework/trunk/t/htdocs/modules/deflate/ssi/default.html
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/modules/deflate/ssi/default.html?rev=952445&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/htdocs/modules/deflate/ssi/default.html (added)
+++ httpd/test/framework/trunk/t/htdocs/modules/deflate/ssi/default.html Mon Jun  7 21:18:05
2010
@@ -0,0 +1 @@
+default
\ No newline at end of file

Added: httpd/test/framework/trunk/t/htdocs/modules/deflate/ssi/ssi2.shtml
URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/htdocs/modules/deflate/ssi/ssi2.shtml?rev=952445&view=auto
==============================================================================
--- httpd/test/framework/trunk/t/htdocs/modules/deflate/ssi/ssi2.shtml (added)
+++ httpd/test/framework/trunk/t/htdocs/modules/deflate/ssi/ssi2.shtml Mon Jun  7 21:18:05
2010
@@ -0,0 +1 @@
+begin-<!--#include virtual="/modules/deflate/ssi/"-->-end



Mime
View raw message