Skip to content

Commit

Permalink
tighten the patten for PSGI environment variables. Fix #703
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Jan 5, 2024
1 parent fa66e15 commit 8d0894b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Plack/Request.pm
Original file line number Diff line number Diff line change
Expand Up @@ -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};
Expand Down
2 changes: 2 additions & 0 deletions t/Plack-Request/upload.t
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 8d0894b

Please sign in to comment.