- 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);
+ # Documentation/technical/http-protocol.txt in git.git
+ # requires one and exactly one query parameter:
+ if ($env->{QUERY_STRING} =~ /\Aservice=git-\w+-pack\z/ ||
+ $path =~ /\Agit-\w+-pack\z/) {
+ my $ok = serve_smart($env, $git, $path);