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/ViewDiff.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/ViewDiff.pm') diff --git a/lib/PublicInbox/ViewDiff.pm b/lib/PublicInbox/ViewDiff.pm index 94f015f4..1aad2832 100644 --- a/lib/PublicInbox/ViewDiff.pm +++ b/lib/PublicInbox/ViewDiff.pm @@ -45,12 +45,12 @@ sub diff_hunk ($$$$) { my ($n) = ($ca =~ /^-(\d+)/); $n = defined($n) ? do { ++$n; "#n$n" } : ''; - my $rv = qq(@@ {Q}$n>$ca); + my $rv = qq(@@ {Q}$n>$ca); ($n) = ($cb =~ /^\+(\d+)/); $n = defined($n) ? do { ++$n; "#n$n" } : ''; - $rv .= qq( {Q}$n>$cb @@); + $rv .= qq( {Q}$n>$cb @@); } sub flush_diff ($$$$) { @@ -90,11 +90,11 @@ sub flush_diff ($$$$) { } $$dst .= to_html($linkify, $s); } elsif ($s =~ s/^(index $OID_NULL\.\.)($OID_BLOB)\b//o) { - $$dst .= qq($1{Q}>$2); + $$dst .= qq($1{Q}>$2); $$dst .= to_html($linkify, $s) ; } elsif ($s =~ s/^index ($OID_NULL)(\.\.$OID_BLOB)\b//o) { $$dst .= 'index '; - $$dst .= qq({Q}>$1$2); + $$dst .= qq({Q}>$1$2); $$dst .= to_html($linkify, $s); } elsif ($s =~ /^index ($OID_BLOB)\.\.($OID_BLOB)/o) { $dctx->{oid_a} = $1; -- cgit v1.2.3-24-ge0c7