Branch Coverage

blib/lib/Net/WebSocket/Handshake/Server.pm
Criterion Covered Total %
branch 25 26 96.1


line true false branch
67 2 2 if ($protocol ne 'HTTP/1.1')
87 2 2 if ($method ne 'GET')
99 7 20 if ($name eq 'sec-websocket-version') { }
5 15 elsif ($name eq 'sec-websocket-key') { }
1 14 elsif ($name eq 'sec-websocket-protocol') { }
100 2 5 if ($value ne 13)
107 1 4 unless ($value =~ m[\A[A-Za-z0-9/\+]{22}==\z])
117 2 1 unless (defined $self->{'_subprotocol'})
139 1 1 defined $self->{'_subprotocol'} ? :
2 0 if $self->{'_no_use_legacy'}
149 1 3 unless $self->{'_version_ok'}
150 1 3 unless $self->{'key'}
152 1 3 if (@needed)