X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FCatalyst.pm;h=2f6fe22d84bdcf1d001d0546075f10611f23a54d;hb=201e0a1fbca74dbe62eb5233df7861bcc7a384e9;hp=0e15f5b67f2255b0e520d43c8e009c5b4db22314;hpb=89ba65d5fb85ab30fa5d8109cd0d22860608605b;p=catagits%2FCatalyst-Runtime.git diff --git a/lib/Catalyst.pm b/lib/Catalyst.pm index 0e15f5b..2f6fe22 100644 --- a/lib/Catalyst.pm +++ b/lib/Catalyst.pm @@ -36,6 +36,7 @@ use Try::Tiny; use Plack::Middleware::Conditional; use Plack::Middleware::ReverseProxy; use Plack::Middleware::IIS6ScriptNameFix; +use Plack::Middleware::IIS7KeepAliveFix; use Plack::Middleware::LighttpdScriptNameFix; BEGIN { require 5.008003; } @@ -100,7 +101,7 @@ __PACKAGE__->stats_class('Catalyst::Stats'); # Remember to update this in Catalyst::Runtime as well! -our $VERSION = '5.90014'; +our $VERSION = '5.90015'; sub import { my ( $class, @arguments ) = @_; @@ -2793,6 +2794,16 @@ sub apply_default_middlewares { # IIS versions $psgi_app = Plack::Middleware::IIS6ScriptNameFix->wrap($psgi_app); + # And another IIS issue, this time with IIS7. + $psgi_app = Plack::Middleware::Conditional->wrap( + $psgi_app, + builder => sub { Plack::Middleware::IIS7KeepAliveFix->wrap($_[0]) }, + condition => sub { + my ($env) = @_; + return unless $env->{SERVER_SOFTWARE} && $env->{SERVER_SOFTWARE} =~ m!IIS\/7\.[0-9]!; 1; }, ); + }, + ); + return $psgi_app; }