]> Sergey Matveev's repositories - public-inbox.git/commitdiff
cgi: avoid parsing ENV directly for PATH_INFO
authorEric Wong <e@80x24.org>
Sat, 12 Apr 2014 00:52:40 +0000 (00:52 +0000)
committerEric Wong <e@80x24.org>
Sat, 12 Apr 2014 00:52:57 +0000 (00:52 +0000)
This might make it easier to go to non-CGI things.

public-inbox.cgi

index fb435777c666b987f8a6bc085dae3b923852d6fc..313a4f22e66eae0923191ef9e654e296c79075e5 100755 (executable)
@@ -50,7 +50,7 @@ sub main {
        if ($cgi->request_method !~ /\AGET|HEAD\z/) {
                return r("405 Method Not Allowed");
        }
-       my $path_info = decode_utf8($ENV{PATH_INFO});
+       my $path_info = decode_utf8($cgi->path_info);
 
        # top-level indices and feeds
        if ($path_info eq "/") {