diff options
author | Eric Wong <e@80x24.org> | 2017-02-19 19:01:39 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2017-02-19 19:04:03 +0000 |
commit | 4af278501461f91844da1e2ffb82cf8571238d02 (patch) | |
tree | e9cec31f3fee5a30ab4d16aa371c97850815a905 /lib/PublicInbox/RepoGitTree.pm | |
parent | a2d5afa6a83ab8f97dd344d72be537952255b3e8 (diff) | |
download | public-inbox-4af278501461f91844da1e2ffb82cf8571238d02.tar.gz |
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.
Diffstat (limited to 'lib/PublicInbox/RepoGitTree.pm')
-rw-r--r-- | lib/PublicInbox/RepoGitTree.pm | 4 |
1 files changed, 1 insertions, 3 deletions
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\n<b>mode\tsize\tname</b>\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; |