Subject: | Invalid content type error on POST when charset included in Content-Type header |
Hi,
I get an "Invalid content type!" error when using
parse_form_data('POST') to parse a POST with a "Content-Type:
application/x-www-form-urlencoded; charset=UTF-8" header.
I understand that it is perfectly valid to include a charset in the
Content-Type header.
I guess:
$content_type eq 'application/x-www-form-urlencoded'
...should be something along the lines of:
$content_type =~ m{^application/x-www-form-urlencoded}
Regards,
Dan
perl v5.10.0 built for i386-linux-thread-multi
Fedora Linux 2.6.27.5-41.fc9.i686
Subject: | Lite-2.02.pm.diff |
--- Lite.pm 2008-12-12 21:00:37.000000000 +0000
+++ Lite.new.pm 2008-12-12 21:21:01.000000000 +0000
@@ -673,7 +673,7 @@
} elsif ($request_method =~ /^post$/i) {
if (!$content_type ||
- ($content_type eq 'application/x-www-form-urlencoded')) {
+ ($content_type =~ m{^application/x-www-form-urlencoded})) {
local $^W = 0;