about summary refs log tree commit homepage
path: root/lib/PublicInbox/RepoGitRaw.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2017-02-19 19:01:39 +0000
committerEric Wong <e@80x24.org>2017-02-19 19:04:03 +0000
commit4af278501461f91844da1e2ffb82cf8571238d02 (patch)
treee9cec31f3fee5a30ab4d16aa371c97850815a905 /lib/PublicInbox/RepoGitRaw.pm
parenta2d5afa6a83ab8f97dd344d72be537952255b3e8 (diff)
downloadpublic-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/RepoGitRaw.pm')
-rw-r--r--lib/PublicInbox/RepoGitRaw.pm13
1 files changed, 4 insertions, 9 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 = "<h2>$title</h2><ul>";
         if (@ex) {
-                if ($tslash) {
-                        $t .= qq(<li><a\nhref="../">../</a></li>);
-                } else  {
-                        $t .= qq(<li><a\nhref="./">../</a></li>);
-                        my $last = PublicInbox::Hval->utf8($ex[-1])->as_href;
-                        $pfx = "$last/";
-                }
+                $t .= qq(<li><a\nhref="./">../</a></li>);
+                my $last = PublicInbox::Hval->utf8($ex[-1])->as_href;
+                $pfx = "$last/";
         }
 
         $req->{tpfx} = $pfx;