Skip to content

Commit

Permalink
* Only fetch from %$env for the keys that actually matches /^HTTP_/i;
Browse files Browse the repository at this point in the history
  this is required for "plackup -s Feersum" support, because the
  "psgix.io" value provided by Feersum can only be fetched once.
  • Loading branch information
audreyt committed May 28, 2011
1 parent 2cf59ac commit 30f8156
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/Mojo/Message/Request.pm
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,12 @@ sub _parse_env {
my $base = $url->base;

# Headers
while (my ($name, $value) = each %$env) {
for my $name (keys %$env) {

# Header
if ($name =~ s/^HTTP_//i) {
if ($name =~ /^HTTP_/i) {
my $value = $env->{$name};
$name =~ s/^HTTP_//i;
$name =~ s/_/-/g;
$headers->header($name, $value);

Expand Down

0 comments on commit 30f8156

Please sign in to comment.