Small patch to support "plackup -s Feersum" #152

Merged
merged 1 commit into from May 28, 2011
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);