From f82593fc84a6773cd6fcb0633fdcca4cee92859f Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sat, 19 Jan 2019 08:54:42 +0000 Subject: view: enforce trailing slash for /$INBOX/$OID/s/ endpoints As with our use of the trailing slash in $MESSAGE_ID/T/ and '$MESSAGE_ID/t/' endpoints, this for 'wget -r --mirror' compatibility as well as allowing sysadmins to quickly stand up a static directory with "index.html" in it to reduce load. --- lib/PublicInbox/ViewVCS.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/ViewVCS.pm') diff --git a/lib/PublicInbox/ViewVCS.pm b/lib/PublicInbox/ViewVCS.pm index 90c09078..61f4deba 100644 --- a/lib/PublicInbox/ViewVCS.pm +++ b/lib/PublicInbox/ViewVCS.pm @@ -27,7 +27,7 @@ my $enc_utf8 = find_encoding('UTF-8'); sub html_page ($$$) { my ($ctx, $code, $strref) = @_; - $ctx->{-upfx} = '../'; # from "/$INBOX/$OID/s" + $ctx->{-upfx} = '../../'; # from "/$INBOX/$OID/s/" PublicInbox::WwwStream->response($ctx, $code, sub { my ($nr, undef) = @_; $nr == 1 ? $$strref : undef; @@ -82,7 +82,7 @@ sub show ($$;$) { } my $path = to_filename($di->{path_b} || $hints->{path_b} || 'blob'); - my $raw_link = "(raw)"; + my $raw_link = "(raw)"; if ($binary) { $log = "
$oid $type $size bytes (binary)" .
 			" $raw_link
" . $log; -- cgit v1.2.3-24-ge0c7