you're right. amending catalyst::engine to say
my $u = Catalyst::Request::Upload->new
(
size => $upload->{size},
type => $headers->content_type,
headers => $headers,
tempname => $upload->{tempname},
filename => $upload->{filename},
);
use Data::Dump
+er;
die '$headers:
+'.Dumper($headers).
'type:'.Du
+mper($headers->content_type).
'$u:'.Dump
+er($u).
"\nek!";
gives
[error] Caught exception in engine "$headers:$VAR1 = bless( {
'content-disposition' => 'form-data; name="SourceFile
+_1"; filename="aaa.jpg"',
'content-type' => 'image/jpeg; charset=utf-8; Content
+-Transfer-Encoding: binary'
}, 'HTTP::Headers' );
type:$VAR1 = 'image/jpeg';
$VAR2 = 'charset=utf-8; Content-Transfer-Encoding: binary';
$u:$VAR1 = bless( {
'aaa.jpg' => undef,
'/tmp/P3v6fH2JR6' => 'filename',
'HTTP::Headers=HASH(0x40e9e58)' => 'tempname',
'type' => 'image/jpeg',
'charset=utf-8; Content-Transfer-Encoding: binary' =>
+ 'headers',
'size' => 374205
}, 'Catalyst::Request::Upload' );
ek! at /Library/Perl/5.8.6/Catalyst/Engine.pm line 556."
so it looks like $headers->content_type is indeed returning two values. I'll suggest a patch.
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.