Lazyweb:
Catalyst uses HTTP::Body to decode incoming HTTP requests. This is particularly important for HTML form-based file uploads. It works great for me in any browser and when uploading text files. But when uploading binary files via Test::WWW::Mechanize::Catalyst, HTTP::Body over-reads the MIME part and drops the file upload.
I suspect its a problem with byte-length vs. character-length of a string, where my request has some UTF-8ness going on in the Test::W::M::C workflow (where the request never actually goes over the wire -- it stays in the same Perl process the whole time).
Has anyone else encountered this? I posted a workaround request to RT for HTTP::Body, but I'm not sure who's really at fault here: me, HTTP::Body or T::W::M::C.
Re:Easy work around
ChrisDolan on 2008-06-24T05:22:26
Thanks for the info. I'm using my own hack -- Base64 encoding the uploaded file and doing a special-case decode server-side -- which is working well enough for the moment.
If you or I can isolate the problem far enough, one of us should write it up as an RT bug report.
Re:Easy work around
dhsonny on 2008-06-24T05:29:35
I talked to the package maintainer this morning and he asked me to patch it if I could. Seems he's swamped with other stuff. I'll look into getting a patch out sometime next month. ( Hopefully I can find the exact cause in a week or two )