From d6d1f632bf8c7f34ae014a9cd69fde699bbe183a Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 10 Sep 2022 08:16:56 +0000 Subject: www_stream: aresponse assumes 200, too There's no reason to be streaming large amounts of HTML for anything other than a 200 response. --- lib/PublicInbox/View.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/PublicInbox/View.pm') diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 033af283..1cbc62be 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -80,7 +80,7 @@ sub msg_page { # allow user to easily browse the range around this message if # they have ->over $ctx->{-t_max} = $smsg->{ts}; - PublicInbox::WwwStream::aresponse($ctx, 200, \&msg_page_i); + PublicInbox::WwwStream::aresponse($ctx, \&msg_page_i); } # /$INBOX/$MESSAGE_ID/#R @@ -432,7 +432,7 @@ sub stream_thread_i { # PublicInbox::WwwStream::getline callback sub stream_thread ($$) { my ($rootset, $ctx) = @_; @{$ctx->{-queue}} = map { (0, $_) } @$rootset; - PublicInbox::WwwStream::aresponse($ctx, 200, \&stream_thread_i); + PublicInbox::WwwStream::aresponse($ctx, \&stream_thread_i); } # /$INBOX/$MSGID/t/ and /$INBOX/$MSGID/T/ @@ -483,7 +483,7 @@ EOF # flat display: lazy load the full message from smsg $ctx->{msgs} = $msgs; $ctx->{-html_tip} = '
';
-	PublicInbox::WwwStream::aresponse($ctx, 200, \&thread_html_i);
+	PublicInbox::WwwStream::aresponse($ctx, \&thread_html_i);
 }
 
 sub thread_html_i { # PublicInbox::WwwStream::getline callback
-- 
cgit v1.2.3-24-ge0c7