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/RepoGitTree.pm | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'lib/PublicInbox/RepoGitTree.pm') diff --git a/lib/PublicInbox/RepoGitTree.pm b/lib/PublicInbox/RepoGitTree.pm index 5b428da0..5e880ee3 100644 --- a/lib/PublicInbox/RepoGitTree.pm +++ b/lib/PublicInbox/RepoGitTree.pm @@ -191,9 +191,7 @@ sub git_tree_show { my $pfx; $req->{thtml} .= "\npath: $t\n\nmode\tsize\tname\n"; - if ($req->{tslash}) { - $pfx = '../'; - } elsif (defined(my $last = $req->{extra}->[-1])) { + if (defined(my $last = $req->{extra}->[-1])) { $pfx = PublicInbox::Hval->utf8($last)->as_path; } elsif (defined $req->{h}) { $pfx = $req->{-repo}->tip; -- cgit v1.2.3-24-ge0c7