From 4af278501461f91844da1e2ffb82cf8571238d02 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Sun, 19 Feb 2017 19:01:39 +0000 Subject: repobrowse: unconditionally remove trailing slash handling We do not need specialized trailing slashes if we break URL compatibility from cgit, here. Removing trailing (and redundant) slashes improves our hit rates with across both server-side (varnish, squid) and client-side (browser) layers. --- lib/PublicInbox/RepoGitRaw.pm | 13 ++++--------- lib/PublicInbox/RepoGitTree.pm | 4 +--- lib/PublicInbox/Repobrowse.pm | 41 ++++++++++++++++++++--------------------- t/repobrowse_git_raw.t | 6 ------ 4 files changed, 25 insertions(+), 39 deletions(-) diff --git a/lib/PublicInbox/RepoGitRaw.pm b/lib/PublicInbox/RepoGitRaw.pm index ce6d7e73..a38d7deb 100644 --- a/lib/PublicInbox/RepoGitRaw.pm +++ b/lib/PublicInbox/RepoGitRaw.pm @@ -65,17 +65,12 @@ sub git_tree_raw { my @ex = @{$req->{extra}}; my $rel = $req->{relcmd}; my $title = utf8_html(join('/', '', @ex, '')); - my $tslash = $req->{tslash}; - my $pfx = $tslash ? './' : 'raw/'; + my $pfx = 'raw/'; my $t = "

$title