Make sure to construct Upload objects properly, even if there are multiple Content...
Florian Ragwitz [Fri, 26 Mar 2010 16:00:54 +0000 (16:00 +0000)]
Closes RT#55976.

Changes
lib/Catalyst/Engine.pm

diff --git a/Changes b/Changes
index 4fb2dff..4db5cf4 100644 (file)
--- 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
 
index 7ba4167..b582103 100644 (file)
@@ -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},