Skip Menu |

This queue is for tickets about the CGI-Lite CPAN distribution.

Report information
The Basics
Id: 34827
Status: resolved
Priority: 0/
Queue: CGI-Lite

People
Owner: HOUSTON [...] cpan.org
Requestors: mikhail.maluyk [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 2.02
Fixed in: 2.03



Subject: Firefox 3 and Content-type
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.
From: benp [...] plixer.com
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.
Hello, This is essentially the same problem (and fix) as with ticket 16236. The fix will be put in place for the next release. Thanks for your report, Pete 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.
This has been fixed in version 2.03. Parent ticket 16236 will be held as "patched" for the rest of this month - so please follow up there if you have any further comments on this issue.