Branch Coverage

blib/lib/Net/WebSocket/Handshake.pm
Criterion Covered Total %
branch 31 46 67.3


line true false branch
82 1 14 if ($opts{'extensions'})
98 0 2 unless ($self->{'_no_use_legacy'})
122 0 31 unless defined $v
195 0 5 unless (my $key_b64 = $self->{'key'})
215 3 2 $self->{'subprotocols'} && @{$self->{'subprotocols'};} ? :
223 4 1 unless $self->{'extensions'}
227 2 0 if ($xtn->isa('Net::WebSocket::Handshake::Extension')) { }
0 0 elsif ($self->_should_include_extension_in_headers($xtn)) { }
236 0 1 unless @handshake_xtns
246 1 1 unless ($self->{'_warned_legacy'})
260 1 5 unless $self->{'_connection_header_ok'}
261 1 5 unless $self->{'_upgrade_header_ok'}
274 0 0 if ($xtn_handler) { }
277 0 0 if ($xtn_handler->ok_to_use)
294 8 9 if ($hname eq 'connection') { }
8 1 elsif ($hname eq 'upgrade') { }
0 1 elsif ($hname eq 'sec-websocket-protocol') { }
0 1 elsif ($hname eq 'sec-websocket-extensions') { }
297 7 1 if ($t eq 'upgrade')
302 1 7 unless ($self->{'_connection_header_ok'})
309 7 1 if ($t eq 'websocket')
314 1 7 unless ($self->{'_upgrade_header_ok'})
320 0 0 unless (defined $self->{'_match_protocol'})