use proper arrays for array parameter

since there is no other way to get an array parameter when using
x-www-form-urlencoded content type

the previous format with \0 separated strings (known as '-alist' format)
should not be used anymore (in favor of the now supported arrays)

Acked-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
Dominik Csapak 2023-06-06 15:08:49 +02:00 committed by Wolfgang Bumiller
parent f398a3d94b
commit bd9d641690

View File

@ -850,7 +850,12 @@ sub decode_urlencoded {
$v = Encode::decode('utf8', $v);
if (defined(my $old = $res->{$k})) {
$v = "$old\0$v";
if (ref($old) eq 'ARRAY') {
push @$old, $v;
$v = $old;
} else {
$v = [$old, $v];
}
}
}