v3.02 release
[perl/plp/.git] / PLP / Fields.pm
index 99455110d1b53cef47f84db3dad37d12dd52d518..a14f03826d3fd44d67fe516692352aaef1496253 100644 (file)
@@ -17,7 +17,7 @@ sub doit {
        my %get;
        if ($ENV{QUERY_STRING} ne ''){
            for (split /[&;]/, $ENV{QUERY_STRING}) {
-               my @keyval = split /=/;
+               my @keyval = split /=/, $_, 2;
                PLP::Functions::DecodeURI(@keyval);
                $get{$keyval[0]} = $keyval[1] unless $keyval[0] =~ /^\@/;
                push @{ $get{'@' . $keyval[0]} }, $keyval[1];
@@ -31,8 +31,8 @@ sub doit {
        our $post = <STDIN>;
        if (defined($post) && $post ne '' &&
            ($ENV{CONTENT_TYPE} eq '' || $ENV{CONTENT_TYPE} eq 'application/x-www-form-urlencoded')){
-           for (split /[&;]/, $post) {
-               my @keyval = split /=/;
+           for (split /&/, $post) {
+               my @keyval = split /=/, $_, 2;
                PLP::Functions::DecodeURI(@keyval);
                $post{$keyval[0]} = $keyval[1] unless $keyval[0] =~ /^\@/;
                push @{ $post{'@' . $keyval[0]} }, $keyval[1];
@@ -50,7 +50,7 @@ sub doit {
 
     if (defined($ENV{HTTP_COOKIE}) && $ENV{HTTP_COOKIE} ne ''){
        for (split /; ?/, $ENV{HTTP_COOKIE}) {
-           my @keyval = split /=/;
+           my @keyval = split /=/, $_, 2;
            $PLP::Script::cookie{$keyval[0]} ||= $keyval[1];
        }
     }