rlauer6 / perl-amazon-s3

A portable client library for working with and managing Amazon S3 buckets and keys.
http://search.cpan.org/dist/Amazon-S3/
2 stars 6 forks source link

Small fix for error when retrieving keys with charset spec in content-type #16

Closed mbethke closed 3 months ago

mbethke commented 4 months ago

At least on MinIO it can happen that documents have not just a simple content type like text/html but a multipart one like text/html; charset="utf-8". In this case, HTTP::Headers->content_type says:

potential parameters will be chopped off and returned as a separate value if in an array context.

This leads to "odd number of elements in anonymous hash" warnings and a failed get_keys call. Forcing scalar context fixes it.