[Catalyst-dev] Bug in multipart/form-data encoded forms with
blank variables
Andy Grundman
andy at hybridized.org
Tue Mar 27 17:32:24 GMT 2007
On Mar 27, 2007, at 10:52 AM, Ton Voon wrote:
> Hi!
>
> I'm resending this with a new patch file since HTTP-Body has been
> updated recently.
>
> I've come across a bug in Catalyst's handling of POST variables
> that are blank. We use this for some textfields in our forms which
> can be empty. The form is multipart/form-data encoded. The browser
> appears to be sending the data back correctly, but Catalyst is not
> listing the empty parameter. If I change the encoding to
> application/x-www-form-urlencoded, it works as expected.
>
> Please find a patch to Catalyst's test suite to catch this bug.
>
> I believe the issue is in HTTP::Body::MultiPart::handler. I think
> it is due to the early return in the "skip parts without content"
> logic. I've refactored the handler routine so that it treats parts
> with filename differently from standard parameters.
>
> Please find a patch to HTTP::Body, against 0.8. I've included
> patches to the test suite to expect text2 back with an empty value.
> I've also included an edge case if filename is "0".
>
> Please can you consider this for future inclusion. Thanks.
Thanks, I'll look into this today.
More information about the Catalyst-dev
mailing list