Branch Coverage

blib/lib/Net/WebSocket/Handshake.pm
Criterion Covered Total %
branch 22 40 55.0


line true false branch
83 1 7 if ($opts{'extensions'})
99 0 2 unless ($self->{'_no_use_legacy'})
200 0 5 unless (my $key_b64 = $self->{'key'})
220 3 2 $self->{'subprotocols'} && @{$self->{'subprotocols'};} ? :
228 4 1 unless $self->{'extensions'}
232 2 0 if ($xtn->isa('Net::WebSocket::Handshake::Extension')) { }
0 0 elsif ($self->_should_include_extension_in_headers($xtn)) { }
241 0 1 unless @handshake_xtns
251 1 1 unless ($self->{'_warned_legacy'})
265 0 4 unless $self->{'_connection_header_ok'}
266 0 4 unless $self->{'_upgrade_header_ok'}
279 0 0 if ($xtn_handler) { }
282 0 0 if ($xtn_handler->ok_to_use)
299 5 6 if ($hname eq 'connection') { }
5 1 elsif ($hname eq 'upgrade') { }
0 1 elsif ($hname eq 'sec-websocket-protocol') { }
0 1 elsif ($hname eq 'sec-websocket-extensions') { }
302 5 0 if ($t eq 'upgrade')
310 5 0 if ($t eq 'websocket')
317 0 0 unless (defined $self->{'_match_protocol'})