Permalink
Browse files

* Only fetch from %$env for the keys that actually matches /^HTTP_/i;

  this is required for "plackup -s Feersum" support, because the
  "psgix.io" value provided by Feersum can only be fetched once.
  • Loading branch information...
1 parent 2cf59ac commit 30f81565bfdcc4074355fedbea69d50e7c512290 @audreyt committed May 28, 2011
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/Mojo/Message/Request.pm
View
6 lib/Mojo/Message/Request.pm
@@ -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);

0 comments on commit 30f8156

Please sign in to comment.