added mst's fix to ParamParser for Content-type stuffs
Devin Austin [Wed, 2 Feb 2011 08:12:49 +0000 (01:12 -0700)]
lib/Web/Dispatch/ParamParser.pm

index c665502..f70c366 100644 (file)
@@ -14,7 +14,7 @@ sub get_unpacked_query_from {
 
 sub get_unpacked_body_from {
   return $_[0]->{+UNPACKED_BODY} ||= do {
-    if (($_[0]->{CONTENT_TYPE}||'') eq 'application/x-www-form-urlencoded'
+      if (index(lc($_[0]->{CONTENT_TYPE}||''), 'application/x-www-form-urlencoded') >= 0 
         and defined $_[0]->{CONTENT_LENGTH}) {
       $_[0]->{'psgi.input'}->read(my $buf, $_[0]->{CONTENT_LENGTH});
       _unpack_params($buf);
@@ -24,6 +24,7 @@ sub get_unpacked_body_from {
   };
 }
 
+
 {
   # shamelessly stolen from HTTP::Body::UrlEncoded by Christian Hansen