about summary refs log tree commit homepage
path: root/lib/PublicInbox/Repobrowse.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-02-26 10:38:41 +0000
committerEric Wong <e@80x24.org>2016-04-05 18:58:27 +0000
commit7d8cc28839176b7fa67c509aae2b4c050e3abbd1 (patch)
tree45c7aa09481e77a1b9d644c5b822d543fec4ccef /lib/PublicInbox/Repobrowse.pm
parentf08dc18b4f5b3aa7a43bfa9ce754b23028f5babb (diff)
downloadpublic-inbox-7d8cc28839176b7fa67c509aae2b4c050e3abbd1.tar.gz
We already dropped CGI from the master branch, drop it from
repobrowse as well to simplify code.
Diffstat (limited to 'lib/PublicInbox/Repobrowse.pm')
-rw-r--r--lib/PublicInbox/Repobrowse.pm13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/PublicInbox/Repobrowse.pm b/lib/PublicInbox/Repobrowse.pm
index 219b44d6..91d0ab20 100644
--- a/lib/PublicInbox/Repobrowse.pm
+++ b/lib/PublicInbox/Repobrowse.pm
@@ -42,16 +42,11 @@ sub r { [ $_[0], ['Content-Type' => 'text/plain'], [ join(' ', @_, "\n") ] ] }
 # (e.g. curl does not follow 301 unless given "-L")
 my %NO_TSLASH = map { $_ => 1 } qw(Log Commit Tree Summary Tag);
 sub no_tslash {
-        my ($cgi) = @_;
+        my ($cgi) = @_; # Plack::Request
         my ($base, $uri);
-        if (ref($cgi) eq 'CGI') {
-                $base = $cgi->url(-base);
-                $uri = $ENV{REQUEST_URI};
-        } else { # Plack::Request
-                $base = $cgi->base;
-                $base =~ s!/+\z!!;
-                $uri = $cgi->request_uri;
-        }
+        $base = $cgi->base;
+        $base =~ s!/+\z!!;
+        $uri = $cgi->request_uri;
         my $qs = '';
         if ($uri =~ s/(\?.+)\z//) {
                 $qs = $1;