Return-Path: Delivered-To: apmail-httpd-test-cvs-archive@httpd.apache.org Received: (qmail 66532 invoked by uid 500); 5 Jun 2002 07:42:27 -0000 Mailing-List: contact test-cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: test-dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list test-cvs@httpd.apache.org Received: (qmail 66521 invoked from network); 5 Jun 2002 07:42:27 -0000 Date: 5 Jun 2002 07:42:26 -0000 Message-ID: <20020605074226.25879.qmail@icarus.apache.org> From: jerenkrantz@apache.org To: httpd-test-cvs@apache.org Subject: cvs commit: httpd-test/perl-framework/t/modules deflate.t X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N jerenkrantz 2002/06/05 00:42:26 Modified: perl-framework/t/conf extra.conf.in Added: perl-framework/t/htdocs/modules/deflate apache_pb.gif index.html perl-framework/t/modules deflate.t Log: Add test for mod_deflate. Uses three requests (has two URIs - a text file and a GIF): 1) GET /modules/deflate/ (no Accept-Encoding) 2) GET /modules/deflate/ (Accept-Encoding) 3) POST /modules/deflate/echo_post with content of #2's response. If deflate is working, #3 response body should be the same as #1 response body. Revision Changes Path 1.41 +16 -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.40 retrieving revision 1.41 diff -u -r1.40 -r1.41 --- extra.conf.in 2 Jun 2002 21:17:51 -0000 1.40 +++ extra.conf.in 5 Jun 2002 07:42:25 -0000 1.41 @@ -390,3 +390,19 @@ + +## +## mod_deflate test config +## + + + + SetOutputFilter DEFLATE + + + + SetInputFilter DEFLATE + SetHandler echo_post + + + 1.1 httpd-test/perl-framework/t/htdocs/modules/deflate/apache_pb.gif <> 1.1 httpd-test/perl-framework/t/htdocs/modules/deflate/index.html Index: index.html =================================================================== welcome to the glorious world of mod_deflate! 1.1 httpd-test/perl-framework/t/modules/deflate.t Index: deflate.t =================================================================== use strict; use warnings FATAL => 'all'; use Apache::Test; use Apache::TestUtil; use Apache::TestRequest; my @server_deflate_uris=("/modules/deflate/index.html", "/modules/deflate/apache_pb.gif"); my $server_inflate_uri="/modules/deflate/echo_post"; my $tests = @server_deflate_uris; my $vars = Apache::Test::vars(); my $module = 'default'; plan tests => $tests, have_module 'deflate'; print "testing $module\n"; my @deflate_headers; push @deflate_headers, "Accept-Encoding" => "gzip"; my @inflate_headers; push @inflate_headers, "Content-Encoding" => "gzip"; for my $server_deflate_uri (@server_deflate_uris) { my $original_str = GET_BODY($server_deflate_uri); my $deflated_str = GET_BODY($server_deflate_uri, @deflate_headers); my $inflated_str = POST_BODY($server_inflate_uri, @inflate_headers, content => $deflated_str); ok $original_str eq $inflated_str; }