On Thu Apr 10 08:28:23 2008, maluyk wrote:
Show quoted text> There is a problem parsing "Content-type" in new Firefox 3 beta 5.
> Firefox is sending
> "Content-Type: application/x-www-form-urlencoded; charset=UTF-8"
> But CGI::Lite doesn't understand charset value in content-tpye, and
> reports about "Invalid content type!".
>
> I'm running perl 5.8.8 on win32 box.
Here is the fix for this:
On line 675 of Lite.pm you find:
if (!$content_type ||
($content_type eq "application/x-www-form-urlencoded")) {
The issue is that FF3 is appending the charset value, so the 'eq' fails.
If this is changed to:
if (!$content_type ||
($content_type =~ /application\/x-www-form-urlencoded/)) {
..then the match will succeed and everything will work correctly. I
suggest using a match because the next if/else case also utilizes a
match (for multipart/form-data), so it keeps everything consistent.
We've made this patch locally but it REALLY ought to be added to this
module, since it's such a simple fix and with FF3 in public release, a
lot of people are going to start running into this bug very soon.