diff options
| author | Junio C Hamano <gitster@pobox.com> | 2014-12-05 11:42:55 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2014-12-05 11:42:56 -0800 |
| commit | 0b0cd3792049ffad85a626b0f82d78c4cf4e59a2 (patch) | |
| tree | 7640992e29ec958fb3d18685902869b4bc0e47e0 | |
| parent | Merge branch 'rs/receive-pack-use-labs' (diff) | |
| parent | gitweb: hack around CGI's list-context param() handling (diff) | |
| download | git-0b0cd3792049ffad85a626b0f82d78c4cf4e59a2.tar.gz git-0b0cd3792049ffad85a626b0f82d78c4cf4e59a2.zip | |
Merge branch 'jk/gitweb-with-newer-cgi-multi-param'
* jk/gitweb-with-newer-cgi-multi-param:
gitweb: hack around CGI's list-context param() handling
| -rwxr-xr-x | gitweb/gitweb.perl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index ccf75169dd..7a5b23acf2 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -20,6 +20,10 @@ use File::Basename qw(basename); use Time::HiRes qw(gettimeofday tv_interval); binmode STDOUT, ':utf8'; +if (!defined($CGI::VERSION) || $CGI::VERSION < 4.08) { + eval 'sub CGI::multi_param { CGI::param(@_) }' +} + our $t0 = [ gettimeofday() ]; our $number_of_git_cmds = 0; @@ -871,7 +875,7 @@ sub evaluate_query_params { while (my ($name, $symbol) = each %cgi_param_mapping) { if ($symbol eq 'opt') { - $input_params{$name} = [ map { decode_utf8($_) } $cgi->param($symbol) ]; + $input_params{$name} = [ map { decode_utf8($_) } $cgi->multi_param($symbol) ]; } else { $input_params{$name} = decode_utf8($cgi->param($symbol)); } |
