Branch Coverage

lib/PAGI/Middleware/WebSocket/Compression.pm
Criterion Covered Total %
branch 9 42 21.4


line true false branch
70 1 2 if ($scope->{'type'} ne "websocket")
79 1 1 unless ($has_deflate)
87 0 1 unless ($have_zlib)
107 0 1 if $d_status == Compress::Raw::Zlib::Z_OK() and $i_status == Compress::Raw::Zlib::Z_OK()
115 1 0 if ($event->{'type'} eq "websocket.accept")
120 0 1 if ($compression_active)
124 0 0 if $self->{'server_no_context_takeover'}
126 0 0 if $self->{'client_no_context_takeover'}
137 0 0 if ($event->{'type'} eq "websocket.send" and $compression_active)
140 0 0 defined $text ? :
143 0 0 if (defined $data and length $data >= $self->{'min_size'})
148 0 0 if ($status == Compress::Raw::Zlib::Z_OK())
152 0 0 defined $text ? :
160 0 0 if ($self->{'server_no_context_takeover'})
174 0 0 if ($event->{'type'} eq "websocket.receive" and $compression_active)
175 0 0 if ($event->{'compressed'})
177 0 0 if (defined $data)
184 0 0 if ($status == Compress::Raw::Zlib::Z_OK())
185 0 0 if (defined $event->{'text'}) { }
192 0 0 if ($self->{'client_no_context_takeover'})
223 0 1 unless lc $h->[0] eq "sec-websocket-extensions"