diff --git a/lib/Plack/Request.pm b/lib/Plack/Request.pm index 2b094545..437d322b 100644 --- a/lib/Plack/Request.pm +++ b/lib/Plack/Request.pm @@ -95,7 +95,7 @@ sub headers { (my $field = $_) =~ s/^HTTPS?_//; ( lc($field) => $env->{$_} ); } - grep { /^(?:HTTP|CONTENT)/i } keys %$env + grep { /^(?:HTTP|CONTENT)_/ } keys %$env ); } $self->{headers}; diff --git a/t/Plack-Request/upload.t b/t/Plack-Request/upload.t index cf888a45..e78fc38b 100644 --- a/t/Plack-Request/upload.t +++ b/t/Plack-Request/upload.t @@ -20,6 +20,8 @@ my $app = sub { is $files[1]->filename, 'foo2.txt'; ok -e $files[0]->tempname; + unlike $req->headers->as_string, qr/Multipart\.Tempdir/; + is join(', ', sort { $a cmp $b } $req->upload()), 'bar, foo'; for (qw(foo bar)) {