]> Sergey Matveev's repositories - public-inbox.git/commitdiff
git-http-backend: avoid Plack::Request parsing body
authorEric Wong <e@80x24.org>
Mon, 23 May 2016 03:57:45 +0000 (03:57 +0000)
committerEric Wong <e@80x24.org>
Mon, 23 May 2016 03:57:45 +0000 (03:57 +0000)
Only check query parameters since there's no useful body
in there.

lib/PublicInbox/GitHTTPBackend.pm

index 97834de4e97d00cb8b4e8ba4bd43faf058dfe4ee..70990ebc5a6a8fa3f76ac433d811f888cc264a58 100644 (file)
@@ -42,7 +42,7 @@ sub r ($;$) {
 sub serve {
        my ($cgi, $git, $path) = @_;
 
-       my $service = $cgi->param('service') || '';
+       my $service = $cgi->query_parameters->get('service') || '';
        if ($service =~ /\Agit-\w+-pack\z/ || $path =~ /\Agit-\w+-pack\z/) {
                my $ok = serve_smart($cgi, $git, $path);
                return $ok if $ok;