I tried to set some values when reporting
Item5798, but they simply don't apply. Probably it is related to TSA code. I need a test environment to solve this (unfortunately, I don't have one now).
The affected values are those from checkboxes. Radio buttons, text inputs, text areas and selects works well.
--
TWiki:Main/GilmarSantosJr
- 21 Jul 2008
Investigating this issue, I find the problem within
TWiki::Engine::CGI::prepareBodyParameters
:
sub prepareBodyParameters {
my ( $this, $req ) = @_;
return unless $ENV{CONTENT_LENGTH};
my %p = $this->{cgi}->Vars;
while ( my ( $key, $value ) = each %p ) {
$req->bodyParam( -name => $key, -value => $value );
$this->{uploads}->{$key} = 1 if scalar $this->{cgi}->upload($key);
}
}
According to CGI.pm man page:
When using this(CGI::Vars), the thing you must watch out for are multivalued CGI parameters. Because a hash cannot distinguish between scalar and list context, multivalued parameters will be returned as a packed string, separated by the "\0" (null) character. You must split this packed string in order to get at the individual values.
So the fix is to call
$req->bodyParam
this way:
$req->bodyParam( -name => $key, -value => [ split /\0/, $value ] );
--
TWiki:Main.GilmarSantosJr
- 22 Jul 2008
Cleaned "WaitingFor" field.
--
TWiki:Main.GilmarSantosJr
- 10 Aug 2008