HTTP2/StaticTable.pm

filter: Statementstmt 100% 17 / 17 Branchbran 100% 2 / 2 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 2 / 2 Podpod n/a totaltotal 100% 26 / 26 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« HTTP2/HuffmanCodes.pm ↑ Summary
1 package Protocol::HTTP2::StaticTable;
2 13 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
3 13 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 13 require Exporter;
5 13 our @ISA = qw(Exporter);
6 13 our ( @stable, %rstable );
7 13 our @EXPORT = qw(@stable %rstable);
8  
9 13 @stable = (
10 [ ":authority", "" ],
11 [ ":method", "GET" ],
12 [ ":method", "POST" ],
13 [ ":path", "/" ],
14 [ ":path", "/index.html" ],
15 [ ":scheme", "http" ],
16 [ ":scheme", "https" ],
17 [ ":status", "200" ],
18 [ ":status", "204" ],
19 [ ":status", "206" ],
20 [ ":status", "304" ],
21 [ ":status", "400" ],
22 [ ":status", "404" ],
23 [ ":status", "500" ],
24 [ "accept-charset", "" ],
25 [ "accept-encoding", "gzip, deflate" ],
26 [ "accept-language", "" ],
27 [ "accept-ranges", "" ],
28 [ "accept", "" ],
29 [ "access-control-allow-origin", "" ],
30 [ "age", "" ],
31 [ "allow", "" ],
32 [ "authorization", "" ],
33 [ "cache-control", "" ],
34 [ "content-disposition", "" ],
35 [ "content-encoding", "" ],
36 [ "content-language", "" ],
37 [ "content-length", "" ],
38 [ "content-location", "" ],
39 [ "content-range", "" ],
40 [ "content-type", "" ],
41 [ "cookie", "" ],
42 [ "date", "" ],
43 [ "etag", "" ],
44 [ "expect", "" ],
45 [ "expires", "" ],
46 [ "from", "" ],
47 [ "host", "" ],
48 [ "if-match", "" ],
49 [ "if-modified-since", "" ],
50 [ "if-none-match", "" ],
51 [ "if-range", "" ],
52 [ "if-unmodified-since", "" ],
53 [ "last-modified", "" ],
54 [ "link", "" ],
55 [ "location", "" ],
56 [ "max-forwards", "" ],
57 [ "proxy-authenticate", "" ],
58 [ "proxy-authorization", "" ],
59 [ "range", "" ],
60 [ "referer", "" ],
61 [ "refresh", "" ],
62 [ "retry-after", "" ],
63 [ "server", "" ],
64 [ "set-cookie", "" ],
65 [ "strict-transport-security", "" ],
66 [ "transfer-encoding", "" ],
67 [ "user-agent", "" ],
68 [ "vary", "" ],
69 [ "via", "" ],
70 [ "www-authenticate", "" ],
71 );
72  
73 13 for my $k ( 0 .. $#stable ) {
74 793 my $key = join ' ', @{ $stable[$k] };
75 793 $rstable{$key} = $k + 1;
76 $rstable{ $stable[$k]->[0] . ' ' } = $k + 1
77 if ( $stable[$k]->[1] ne ''
78 793 ▶ && !exists $rstable{ $stable[$k]->[0] . ' ' } );
Branch: 1 branch
BranchTrueFalseTotal
if $Protocol::HTTP2::StaticTable::stable[$k][1] ne "" and not exists $Protocol::HTTP2::StaticTable::rstable{$Protocol::HTTP2::StaticTable::stable[$k][0] . ' '} 65 728 793
Condition100%3/3
$Protocol::HTTP2::StaticTable::stable[$k][1] ne "" and not exists $Protocol::HTTP2::StaticTable::rstable{$Protocol::HTTP2::StaticTable::stable[$k][0] . ' '}
!ll&&!rl&&r
61111765
MC/DC100%2/2
$Protocol::HTTP2::StaticTable::stable[$k][1] ne "" and not exists $Protocol::HTTP2::StaticTable::rstable{$Protocol::HTTP2::StaticTable::stable[$k][0] . ' '}
$Protocol::HTTP2::StaticTable::stable[$k][1] ne "" not exists $Protocol::HTTP2::StaticTable::rstable{$Protocol::HTTP2::StaticTable::stable[$k][0] . ' '}
Truth table100%3/3
A and not(B)
A= $Protocol::HTTP2::StaticTable::stable[$k][1] ne ""B= not exists $Protocol::HTTP2::StaticTable::rstable{$Protocol::HTTP2::StaticTable::stable[$k][0] . ' '}
ABresult
0X0
100
111
79 }
80  
81 13 1;
« HTTP2/HuffmanCodes.pm ↑ Summary