Subject: | file_exists: Odd number of elements in anonymous hash |
I have a file uploaded with content_type => 'text/plain; charset=UTF-8';
when I check head_key for the file it triggers the above-mentioned
warning and returns a hashref that looks like:
# result of `say Dumper($bucket->head_key('test/upload-test.txt'));`
Odd number of elements in anonymous hash at
/usr/local/share/perl5/Amazon/S3/Bucket.pm line 90.
$VAR1 = {
'' => undef,
'content_length' => '758',
'content_type' => 'text/plain',
'charset=UTF-8' => 'etag',
'335b8b...' => 'value'
};
The text/plain and the charset got separated from each other, thus keys
and values are swapped after that point, and the final value becomes the
odd key that triggered the warning.
In the S3 console, the complete "text/plain; charset=UTF-8" string is
displayed as the value for "Content-Type".
Observed with Amazon::S3 0.45 on perl 5.10.1 / centos 6.2.