This can happen when processing a multipart request body, because HTTP::Entity::Parser::MultiPart does push @{$env->{'http.entity.parser.multipart.tempdir'}}, $dir; (where $dir is a File::Temp::Dir object).
..and then, Plack::Request constructs its headers by extracting content from $env, but it doesn't omit keys matching /./ (which aren't valid headers).
This manifested itself in my $work application via fluentd, which logs request headers, only in this case it encountered something that wasn't a string, therefore the middleware threw an exception (in Fluent::Logger and Data::MessagePack).
We'll fix it on our end by omitting headers with dots in them, but I think Plack::Request should do the same.
This can happen when processing a multipart request body, because HTTP::Entity::Parser::MultiPart does
push @{$env->{'http.entity.parser.multipart.tempdir'}}, $dir;
(where $dir is a File::Temp::Dir object)...and then, Plack::Request constructs its headers by extracting content from
$env
, but it doesn't omit keys matching/./
(which aren't valid headers).This manifested itself in my $work application via fluentd, which logs request headers, only in this case it encountered something that wasn't a string, therefore the middleware threw an exception (in Fluent::Logger and Data::MessagePack).
We'll fix it on our end by omitting headers with dots in them, but I think Plack::Request should do the same.