From a12cd80b5821cf5cb2c8672aad0fba94c451f728 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 6 Jan 2023 10:10:51 +0000 Subject: httpd/async: retry reads properly when parsing headers While git-http-backend sends headers with one write syscall, upstream cgit still trickles them out line-by-line and we need to account for that and retry Qspawn {parse_hdr} callbacks. --- lib/PublicInbox/Qspawn.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/Qspawn.pm') diff --git a/lib/PublicInbox/Qspawn.pm b/lib/PublicInbox/Qspawn.pm index f8cbffcb..7984e35a 100644 --- a/lib/PublicInbox/Qspawn.pm +++ b/lib/PublicInbox/Qspawn.pm @@ -134,7 +134,7 @@ sub start ($$$) { } } -sub psgi_qx_init_cb { +sub psgi_qx_init_cb { # this may be PublicInbox::HTTPD::Async {cb} my ($self) = @_; my $async = delete $self->{async}; # PublicInbox::HTTPD::Async my ($r, $buf); @@ -223,7 +223,7 @@ sub rd_hdr ($) { $ret; } -sub psgi_return_init_cb { +sub psgi_return_init_cb { # this may be PublicInbox::HTTPD::Async {cb} my ($self) = @_; my $r = rd_hdr($self) or return; my $env = $self->{psgi_env}; -- cgit v1.2.3-24-ge0c7