Branch Coverage

blib/lib/Net/WebSocket/Handshake.pm
Criterion Covered Total %
branch 21 40 52.5


line true false branch
83 1 4 if ($opts{'extensions'})
99 0 2 unless ($self->{'_no_use_legacy'})
192 0 3 unless (my $key_b64 = $self->{'key'})
212 3 0 $self->{'subprotocols'} && @{$self->{'subprotocols'};} ? :
220 2 1 unless $self->{'extensions'}
224 2 0 if ($xtn->isa('Net::WebSocket::Handshake::Extension')) { }
0 0 elsif ($self->_should_include_extension_in_headers($xtn)) { }
233 0 1 unless @handshake_xtns
243 1 1 unless ($self->{'_warned_legacy'})
257 0 2 unless $self->{'_connection_header_ok'}
258 0 2 unless $self->{'_upgrade_header_ok'}
271 0 0 if ($xtn_handler) { }
274 0 0 if ($xtn_handler->ok_to_use)
291 2 3 if ($hname eq 'connection') { }
2 1 elsif ($hname eq 'upgrade') { }
0 1 elsif ($hname eq 'sec-websocket-protocol') { }
0 1 elsif ($hname eq 'sec-websocket-extensions') { }
294 2 0 if ($t eq 'upgrade')
302 2 0 if ($t eq 'websocket')
309 0 0 unless (defined $self->{'_match_protocol'})