From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.2 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF shortcircuit=no autolearn=ham autolearn_force=no version=3.4.6 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 985771F487 for ; Tue, 2 Jul 2024 23:27:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=80x24.org; s=selector1; t=1719962823; bh=3zLAustHn/HVGlEvkbo+uhHk2mE8kaC/Yca1HCoB7ZA=; h=From:To:Subject:Date:From; b=nxJMIaaLiX62RHHzNY9k1Xym1DeuVar6oYXeB+uybbPOMt7fRAL8Vi6utcQahwlKG X6Gyn10U2WzDJB+4Vd1dUA5eTwDj5NXSofJbanSqlJ+t4Qjxov2biVH9/d5ebLzBNi EQGYhzhJ7iIlV6j9FJ9YbvEALMHFGUE7P+XpqwAg= From: Eric Wong To: meta@public-inbox.org Subject: [PATCH] http: fix 304 responses w/o entity body w/o reverse proxy Date: Tue, 2 Jul 2024 23:27:03 +0000 Message-ID: <20240702232703.4079037-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: This was hidden by instances using varnish nginx; but is readily apparent when hitting static manifest.js.gz when using `curl -z' --- lib/PublicInbox/HTTP.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/HTTP.pm b/lib/PublicInbox/HTTP.pm index bead222e..4ccb1b81 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') {