From: Florian Ragwitz Date: Fri, 26 Mar 2010 16:00:54 +0000 (+0000) Subject: Make sure to construct Upload objects properly, even if there are multiple Content... X-Git-Tag: 5.80022~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Runtime.git;a=commitdiff_plain;h=a160c98d29bf1df03934bd68da939e0b517dbb32 Make sure to construct Upload objects properly, even if there are multiple Content-Type headers. Closes RT#55976. --- diff --git a/Changes b/Changes index 4fb2dff..4db5cf4 100644 --- a/Changes +++ b/Changes @@ -19,6 +19,8 @@ Bug fixed: - DispatchType::Index's uri_for_action only returns for actions registered with it (prevents 'index :Path' or similar resolving to the wrong URI) + - Make sure to construct Upload objects properly, even if there are + multiple Content-Type headers (Closes RT#55976). 5.80021 2010-03-03 23:02:01 diff --git a/lib/Catalyst/Engine.pm b/lib/Catalyst/Engine.pm index 7ba4167..b582103 100644 --- a/lib/Catalyst/Engine.pm +++ b/lib/Catalyst/Engine.pm @@ -543,7 +543,7 @@ sub prepare_uploads { my $u = Catalyst::Request::Upload->new ( size => $upload->{size}, - type => $headers->content_type, + type => scalar $headers->content_type, headers => $headers, tempname => $upload->{tempname}, filename => $upload->{filename},