]> git.ipfire.org Git - thirdparty/public-inbox.git/commitdiff
repobrowse: do not unescape PATH_INFO twice
authorEric Wong <e@80x24.org>
Tue, 14 Feb 2017 23:19:34 +0000 (23:19 +0000)
committerEric Wong <e@80x24.org>
Tue, 14 Feb 2017 23:19:34 +0000 (23:19 +0000)
PSGI specs already require PATH_INFO to be unescaped.

Followup-to: commit 364de65f8a6b5729027cb70228312a141430122f
("www: do not unescape PATH_INFO twice")

lib/PublicInbox/Repobrowse.pm

index 87e1227802fc79e082e10442d9c7ce230e5937bb..c16f10fd98379766692415aeeba18a15567068c2 100644 (file)
@@ -20,7 +20,7 @@
 package PublicInbox::Repobrowse;
 use strict;
 use warnings;
-use URI::Escape qw(uri_escape_utf8 uri_unescape);
+use URI::Escape qw(uri_escape_utf8);
 use PublicInbox::RepoConfig;
 
 my %CMD = map { lc($_) => $_ } qw(Log Commit Tree Patch Blob Plain Tag Atom
@@ -92,7 +92,7 @@ sub call {
        # URL syntax: / repo [ / cmd [ / path ] ]
        # cmd: log | commit | diff | tree | view | blob | snapshot
        # repo and path (@extra) may both contain '/'
-       my $path_info = uri_unescape($env->{PATH_INFO});
+       my $path_info = $env->{PATH_INFO};
        my (undef, $repo_path, @extra) = split(m{/+}, $path_info, -1);
 
        return $self->root_index($self) unless length($repo_path);