[Catalyst] Empty form elements missing in multipart POSTs

Brian Kirkbride brian.kirkbride at deeperbydesign.com
Thu Mar 9 22:31:41 CET 2006


My apologies if this has been covered, but I couldn't find
anything on Google or Trac.

When HTTP::Body::MultiPart.pm handles a POST with empty
form elements, they are not included in params.  This makes
it impossible to accept an empty field from a form to
overwrite existing data.

The relevant lines are in the handler method:

# skip parts without content
if ( $part->{done} && $part->{size} == 0 ) {
  return 0;
}

I need enctype="multipart/form-data" to handle file uploads,
otherwise I would use urlencoded as it seems to work.

Please let me know if I'm missing something here and thanks
in advance for your help.

- Brian Kirkbride



More information about the Catalyst mailing list