* [PATCH] http: fix 304 responses w/o entity body w/o reverse proxy
@ 2024-07-02 23:27 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2024-07-02 23:27 UTC (permalink / raw)
To: meta
This was hidden by instances using varnish <and|or> 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') {
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2024-07-02 23:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-02 23:27 [PATCH] http: fix 304 responses w/o entity body w/o reverse proxy Eric Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).