Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

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

Merged
merged 1 commit into from

2 participants

@audreyt

Hi! First of all, thanks for the Mojolicious framework - I'm only a few days into it but it's been a joyful ride thus far.

This patch is required for "plackup -s Feersum" support, because currently fetching the "psgix.io" env provided by Feersum (i.e. triggering its SV get magic) without a "psgi.streaming" response results in an error.

Since the patch in the Mojo side to avoid accidentally fetching $env->{'psgix.io'} is trivial, it'd be wonderful if you can consider it for inclusion. :-)

Many thanks!
Audrey

@audreyt audreyt * 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.
30f8156
@kraih kraih merged commit 4125872 into from
@kraih
Owner

Thanks, glad you like it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on May 28, 2011
  1. @audreyt

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

    audreyt authored
      this is required for "plackup -s Feersum" support, because the
      "psgix.io" value provided by Feersum can only be fetched once.
This page is out of date. Refresh to see the latest.
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);
Something went wrong with that request. Please try again.