From: Eric Wong Date: Tue, 2 Jul 2024 23:27:03 +0000 (+0000) Subject: http: fix 304 responses w/o entity body w/o reverse proxy X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de63c96653775cb0360e6270cfa151f88ef31adb;p=thirdparty%2Fpublic-inbox.git http: fix 304 responses w/o entity body w/o reverse proxy This was hidden by instances using varnish nginx; but is readily apparent when hitting static manifest.js.gz when using `curl -z' --- diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm index bead222ec..4ccb1b817 100644 --- a/lib/PublicInbox/HTTP.pm +++ b/lib/PublicInbox/HTTP.pm @@ -189,7 +189,8 @@ sub response_header_write ($$$) { } my $conn = $env->{HTTP_CONNECTION} || ''; - my $term = defined($len) || $chunked; + my $term = defined($len) || $chunked || + Plack::Util::status_with_no_entity_body($status); my $prot_persist = ($proto eq 'HTTP/1.1') && ($conn !~ /\bclose\b/i); my ($alive, $res_body); if (!$term && ref($res->[2]) eq 'ARRAY') {