X-Git-Url: http://www.git.stargrave.org/?a=blobdiff_plain;f=lib%2FPublicInbox%2FWwwStatic.pm;h=b3476ab82e0922eb9c8f99ca5690016a30806571;hb=5c8909925072804901e9c3b45bbf25446d379e7b;hp=051d2e039b979f3f8b73a6b7aafe4b9f5a0d3d6f;hpb=20607bd628f4f8ea985661a8ce123ea482058144;p=public-inbox.git diff --git a/lib/PublicInbox/WwwStatic.pm b/lib/PublicInbox/WwwStatic.pm index 051d2e03..b3476ab8 100644 --- a/lib/PublicInbox/WwwStatic.pm +++ b/lib/PublicInbox/WwwStatic.pm @@ -1,4 +1,4 @@ -# Copyright (C) 2016-2020 all contributors +# Copyright (C) 2016-2021 all contributors # License: AGPL-3.0+ # This package can either be a PSGI response body for a static file @@ -9,8 +9,8 @@ # functionality of nginx. package PublicInbox::WwwStatic; use strict; +use v5.10.1; use parent qw(Exporter); -use bytes (); use Fcntl qw(SEEK_SET O_RDONLY O_NONBLOCK); use POSIX qw(strftime); use HTTP::Date qw(time2str); @@ -318,7 +318,7 @@ sub dir_response ($$$) { "
Index of $path_info_html

\n");
 	$gzf->zmore(join("\n", @entries));
 	my $out = $gzf->zflush("

\n"); - $h->[3] = bytes::length($out); + $h->[3] = length($out); [ 200, $h, [ $out ] ] }