Subject: | Uploads: Catalyst::Engine::prepare_uploads calls HTTP::Headers in array context,should be scalar |
In Uploads: Catalyst::Engine::prepare_uploads, suggest amending:
my $u = Catalyst::Request::Upload->new
(
size => $upload->{size},
type => $headers->content_type,
headers => $headers,
tempname => $upload->{tempname},
filename => $upload->{filename},
);
to
my $u = Catalyst::Request::Upload->new
(
size => $upload->{size},
type => scalar($headers->content_type),
headers => $headers,
tempname => $upload->{tempname},
filename => $upload->{filename},
);
because in some situations $headers->content_type can return an array of
2 values (instead of the expected just one scalar) and that screws up
the Catalyst::Request::Upload object completely.
Thanks!
Andy.