Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 0147D200C1D for ; Thu, 16 Feb 2017 22:37:12 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id F2371160B61; Thu, 16 Feb 2017 21:37:11 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 49C23160B52 for ; Thu, 16 Feb 2017 22:37:11 +0100 (CET) Received: (qmail 42090 invoked by uid 500); 16 Feb 2017 21:37:10 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 42081 invoked by uid 99); 16 Feb 2017 21:37:10 -0000 Received: from Unknown (HELO svn01-us-west.apache.org) (209.188.14.144) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 16 Feb 2017 21:37:10 +0000 Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id D22683A0EDB for ; Thu, 16 Feb 2017 21:37:09 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1783308 - /httpd/test/framework/trunk/t/modules/brotli.t Date: Thu, 16 Feb 2017 21:37:09 -0000 To: cvs@httpd.apache.org From: wrowe@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20170216213709.D22683A0EDB@svn01-us-west.apache.org> archived-at: Thu, 16 Feb 2017 21:37:12 -0000 Author: wrowe Date: Thu Feb 16 21:37:09 2017 New Revision: 1783308 URL: http://svn.apache.org/viewvc?rev=1783308&view=rev Log: Test prioritaztion of brotls+deflate Modified: httpd/test/framework/trunk/t/modules/brotli.t Modified: httpd/test/framework/trunk/t/modules/brotli.t URL: http://svn.apache.org/viewvc/httpd/test/framework/trunk/t/modules/brotli.t?rev=1783308&r1=1783307&r2=1783308&view=diff ============================================================================== --- httpd/test/framework/trunk/t/modules/brotli.t (original) +++ httpd/test/framework/trunk/t/modules/brotli.t Thu Feb 16 21:37:09 2017 @@ -5,7 +5,7 @@ use Apache::Test; use Apache::TestUtil; use Apache::TestRequest; -plan tests => 8, need_module 'brotli', need_module 'alias'; +plan tests => 10, need_module 'brotli', need_module 'alias'; my $r; @@ -51,7 +51,7 @@ if (!defined($r->header("ETag"))) { if (have_module('deflate')) { # GET request against the location with fallback to deflate (test that # Brotli is chosen due to the order in SetOutputFilter). - $r = GET("/brotli_and_deflate/apache_pb.gif", "Accept-Encoding" => "deflate, br"); + $r = GET("/brotli_and_deflate/apache_pb.gif", "Accept-Encoding" => "gzip,br"); ok t_cmp($r->code, 200); ok t_cmp($r->header("Content-Encoding"), "br", "response Content-Encoding is OK"); if (!defined($r->header("Content-Length"))) { @@ -62,6 +62,17 @@ if (have_module('deflate')) { t_debug "ETag field was expected"; ok 0; } + $r = GET("/brotli_and_deflate/apache_pb.gif", "Accept-Encoding" => "gzip"); + ok t_cmp($r->code, 200); + ok t_cmp($r->header("Content-Encoding"), "gzip", "response Content-Encoding is OK"); + if (!defined($r->header("Content-Length"))) { + t_debug "Content-Length was expected"; + ok 0; + } + if (!defined($r->header("ETag"))) { + t_debug "ETag field was expected"; + ok 0; + } } else { - skip "skipping tests without mod_deflate" foreach (1..2); + skip "skipping tests without mod_deflate" foreach (1..4); }