From a66872a124b3cde936a0d31b8d9f5a8fddee7573 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Mon, 22 Aug 2022 02:33:42 +0000 Subject: www: /s/: 404 for unconfigured coderepos The $r404 variable is unset if we have a valid inbox, but no coderepos configured for that inbox, thus we must `r(404)' explicitly. --- lib/PublicInbox/WWW.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/PublicInbox/WWW.pm') diff --git a/lib/PublicInbox/WWW.pm b/lib/PublicInbox/WWW.pm index a33709e9..77f463d3 100644 --- a/lib/PublicInbox/WWW.pm +++ b/lib/PublicInbox/WWW.pm @@ -303,7 +303,8 @@ sub get_text { sub get_vcs_object ($$$;$) { my ($ctx, $inbox, $oid, $filename) = @_; my $r404 = invalid_inbox($ctx, $inbox); - return $r404 if $r404 || !$ctx->{www}->{pi_cfg}->repo_objs($ctx->{ibx}); + return $r404 if $r404; + return r(404) if !$ctx->{www}->{pi_cfg}->repo_objs($ctx->{ibx}); require PublicInbox::ViewVCS; PublicInbox::ViewVCS::show($ctx, $oid, $filename); } -- cgit v1.2.3-24-ge0c7