| 1 | package Plack::Middleware::IIS7KeepAliveFix; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use parent 'Plack::Middleware'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 1 | ▶ | use Plack::Util; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | sub call { | ||||||||
|
Subroutine
call: called CC=1 SCAR=0.2
Pod
documented
| |||||||||||
| 8 | 1 | my($self, $env) = @_; | |||||||||
| 9 | # Fixes buffer being cut off on redirect when keep-alive is active | ||||||||||
| 10 | 1 | my $res = $self->app->($env); | |||||||||
| 11 | |||||||||||
| 12 | 1 | ▶ | Plack::Util::response_cb($res, sub { | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.5
| |||||||||||
| 13 | 1 | my $res = shift; | |||||||||
| 14 | 1 | ▶ | if ($res->[0] =~ m!^30[123]$! ) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 1 | Plack::Util::header_remove($res->[1], 'Content-Length'); | |||||||||
| 16 | 1 | Plack::Util::header_remove($res->[1], 'Content-Type'); | |||||||||
| 17 | 0 | ▶ | return sub{ my $chunk; return unless defined $chunk; return ''; }; | ||||||||
|
Subroutine
__ANON__: called CC=2 SCAR=7.6
Branch: 1 branch
| |||||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | 0 | return; | |||||||||
| 21 | 1 | }); | |||||||||
| 22 | |||||||||||
| 23 | } | ||||||||||
| 24 | |||||||||||
| 25 | 1 | 1; | |||||||||
| 26 | __END__ | ||||||||||