Subject: | CGI->start_form(-method=>"GET") wrong default enctype |
perl -MCGI -e '
print CGI->VERSION, "\n";
print CGI->start_form(-method=>"GET"), "\n"
'
Returns
3.43
<form method="get" action="http://localhost" enctype="multipart/form-data">
But, multipart/form-data is an invalid enctype for the GET method. I
expect the default encoding to be a valid encoding for the GET method.
Actually, this is what I expect.
perl -MCGI -e '
print CGI->VERSION, "\n";
print CGI->start_form(-method=>"GET", -enctype=>undef), "\n";
'
3.43
<form method="get" action="http://localhost"
enctype="application/x-www-form-urlencoded">
This logic does not account or GET vs. POST.
if( $XHTML ){
$enctype = $self->_maybe_escapeHTML($enctype || &MULTIPART);
}else{
$enctype = $self->_maybe_escapeHTML($enctype || &URL_ENCODED);
}
Thanks,
Mike