diff options
author | Eric Wong <e@80x24.org> | 2023-01-06 10:10:50 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2023-01-06 10:24:15 +0000 |
commit | 81a906c55b9510b38ea035dca13475fdd9d27083 (patch) | |
tree | f37bfe6a63e17df72e0cf70590716eef01a1b717 /lib/PublicInbox/Qspawn.pm | |
parent | ba1a1efbcd23ab472b3c5c030082a9064462680b (diff) | |
download | public-inbox-81a906c55b9510b38ea035dca13475fdd9d27083.tar.gz |
Prefer to use the original (cgit||git-http-backend) HTTP response code if our fallback to WwwCoderepo fails. 404 codes is typically more appropriate than 500 for these things.
Diffstat (limited to 'lib/PublicInbox/Qspawn.pm')
-rw-r--r-- | lib/PublicInbox/Qspawn.pm | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/PublicInbox/Qspawn.pm b/lib/PublicInbox/Qspawn.pm index ab0ef25c..f8cbffcb 100644 --- a/lib/PublicInbox/Qspawn.pm +++ b/lib/PublicInbox/Qspawn.pm @@ -109,8 +109,9 @@ sub finalize ($$) { return if $self->{passed}; # another command chained it if (my $wcb = delete $env->{'qspawn.wcb'}) { # have we started writing, yet? + my $code = delete $env->{'qspawn.fallback'} // 500; require PublicInbox::WwwStatic; - $wcb->(PublicInbox::WwwStatic::r(500)); + $wcb->(PublicInbox::WwwStatic::r($code)); } } |