Mailing List Archive

multipart/form-data and CGI.pm newer than 3.38
Hello,

from Version 3.38 on CGI.pm changed the internal storage of cgi
parameters/values.
As a result Embperl fails to read the values of parameters if a form
with enctype "multipart/form-data" is posted.

This is a patch that considers the new internal format of CGI.pm as well
as the old.
It also takes Embperl_Multfieldsep into account to separate multivalue
fields ( instead of the formerly hardcoded "\t" ).

Hope this may help:

Index: Embperl.pm
===================================================================
RCS file: /var/cvsroot/webserver/portal/temp/Embperl_2.3.0.pm,v
retrieving revision 1.1
diff -r1.1 Embperl_2.3.0.pm


321,322c320,324
< #$params = $cgi->param_fetch( $_ ) ;
< $params = $cgi->{$_} ;
---
> #$params = $cgi->param_fetch( $_ ) ;
> #since Version 3.38 CGI stores params and values in a distinct
"namespace"
> #http://rt.perl.org/rt3//Ticket/Display.html?id=24294
>
> $params = $cgi->{'param'}->{$_} || $cgi->{$_} ;
325c327
< $fdat->{ $_ } = join ("\t", @$params) ;
---
> $fdat->{ $_ } = join ( $self -> config -> mult_field_sep() ,
@$params) ;



--
mit freundlichem Gruß,

Frank Wesemann
Fotofinder GmbH USt-IdNr. DE812854514
Software Entwicklung Web: http://www.fotofinder.com/
Potsdamer Str. 96 Tel: +49 30 25 79 28 90
10785 Berlin Fax: +49 30 25 79 28 999

Sitz: Berlin
Amtsgericht Berlin Charlottenburg (HRB 73099)
Geschäftsführer: Ali Paczensky




---------------------------------------------------------------------
To unsubscribe, e-mail: embperl-unsubscribe@perl.apache.org
For additional commands, e-mail: embperl-help@perl.apache.org