blib/lib/Plack/Middleware/IIS7KeepAliveFix.pm

filter: Statementstmt 90.9% 20 / 22 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 87.8% 29 / 33 CC 3 SCAR 4.5
CC
3
Cov
85%
__ANON__
2.1
__ANON__
2.1
call
1.0
CRAP 1.6
« blib/lib/Plack/Request/Upload.pm ↑ Summary blib/lib/Plack/Test/MockHTTP.pm »
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
BranchTrueFalseTotal
if ($res->[0] =~ /^30[123]$/) 1 0 1
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
BranchTrueFalseTotal
unless defined $chunk 2 0 2
18 }
19  
20 0 return;
21 1 });
22  
23 }
24  
25 1 1;
26 __END__
« blib/lib/Plack/Request/Upload.pm ↑ Summary blib/lib/Plack/Test/MockHTTP.pm »