Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed bugs found during tests with mod_scgi on apache 2.2

  • Loading branch information...
commit 73a3332a6f1206fd41399d058b90da735ecac4f7 1 parent b73aebe
@supernovus authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 SCGI.pm
View
6 SCGI.pm
@@ -24,10 +24,12 @@ class SCGI::Request {
my $comma = $.request.substr($offset+$length, 1);
return self.err("malformed netstring, expecting terminating comma, found \"$comma\"") if $comma ne ',';
$.body = $.request.substr($offset+$length+1);
- %.env = $env_string.split("\0");
+ my @env = $env_string.split("\0");
+ @env.pop;
+ %.env = @env;
if $!strict {
return self.err("malformed or missing CONTENT_LENGTH header")\
- unless %.env<CONTENT_LENGTH> \
+ unless defined %.env<CONTENT_LENGTH> \
&& %.env<CONTENT_LENGTH> ~~ / ^ \d+ $ /;
return self.err("missing SCGI header")\
unless %.env<SCGI> && %.env<SCGI> eq '1';
Please sign in to comment.
Something went wrong with that request. Please try again.