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 6 21 if ($name eq 'sec-websocket-version') { }
5 16 elsif ($name eq 'sec-websocket-key') { }
1 15 elsif ($name eq 'sec-websocket-protocol') { }
100 2 4 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)