Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Delete invalid fastcgi_param passed from nginx

  • Loading branch information...
commit f2b0eb575931dc70c24381028cda560eb29dce85 1 parent f7dc9d3
@miyagawa miyagawa authored
Showing with 6 additions and 0 deletions.
  1. +6 −0 lib/Plack/Handler/FCGI.pm
View
6 lib/Plack/Handler/FCGI.pm
@@ -121,6 +121,12 @@ sub run {
$env->{PATH_INFO} = '';
}
+ # typical fastcgi_param from nginx might get empty values
+ for my $key (qw(CONTENT_TYPE CONTENT_LENGTH)) {
+ no warnings;
+ delete $env->{$key} if exists $env->{$key} && $env->{$key} eq '';
+ }
+
if (defined(my $HTTP_AUTHORIZATION = $env->{Authorization})) {
$env->{HTTP_AUTHORIZATION} = $HTTP_AUTHORIZATION;
}
Please sign in to comment.
Something went wrong with that request. Please try again.