Subject: | POSTDATA |
The documentation says that POSTDATA (or PUTDATA) will
be used if the content type is not:
application/x-www-form-urlencoded
multipart/form-data
Unfortunately, the code below demands a content type of some kind
or the script parses the content regardless. Unfortunately, recent
builds of Chrome have resulted in a version of the file uploader which
has no content value, so CGI.pm can't obtain the uploaded file
information.
Starting around line 700:
# YL: Begin Change for XML handler 10/19/2001
if (!$is_xforms && ($meth eq 'POST' || $meth eq 'PUT')
&& defined($ENV{'CONTENT_TYPE'})
&& $ENV{'CONTENT_TYPE'} !~ m|^application/x-www-form-urlencoded|
&& $ENV{'CONTENT_TYPE'} !~ m|^multipart/form-data| ) {
my($param) = $meth . 'DATA' ;
$self->add_parameter($param) ;
push (@{$self->{param}{$param}},$query_string);
undef $query_string ;
}
# YL: End Change for XML handler 10/19/2001
-----------------------------------
The following code is a potential (albeit ugly) fix:
if (!$is_xforms && ($meth eq 'POST' || $meth eq 'PUT')
&& (!defined($ENV{'CONTENT_TYPE'}) || (defined($ENV{'CONTENT_TYPE'})
&& $ENV{'CONTENT_TYPE'} !~ m|^application/x-www-form-urlencoded|
&& $ENV{'CONTENT_TYPE'} !~ m|^multipart/form-data| ))) {
my($param) = $meth . 'DATA' ;
$self->add_parameter($param) ;
push (@{$self->{param}{$param}},$query_string);
undef $query_string ;
}