-# Copyright (C) 2019 all contributors <meta@public-inbox.org>
+# Copyright (C) 2019-2021 all contributors <meta@public-inbox.org>
# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
use strict;
use warnings;
use PublicInbox::TestCommon;
my ($tmpdir, $for_destroy) = tmpdir();
my @mods = qw(HTTP::Request::Common Plack::Test URI::Escape);
-require_mods(@mods);
+require_mods(@mods, 'IO::Uncompress::Gunzip');
use_ok $_ foreach @mods;
use_ok 'PublicInbox::WwwStatic';
$get->header('Accept-Encoding' => 'gzip');
$res = $cb->($get);
is($res->content, "hi", 'got compressed on mtime match');
+
+ $get = GET('/dir/');
+ $get->header('Accept-Encoding' => 'gzip');
+ $res = $cb->($get);
+ my $in = $res->content;
+ my $out = '';
+ IO::Uncompress::Gunzip::gunzip(\$in => \$out);
+ like($out, qr/\A<html>/, 'got HTML start after gunzip');
+ like($out, qr{</html>$}, 'got HTML end after gunzip');
});
done_testing();