| line |
true |
false |
branch |
|
35
|
0 |
42 |
if ($opts{'tls'}) |
|
36
|
0 |
0 |
unless $HAS_TLS |
|
37
|
0 |
0 |
unless $opts{'cert_file'} |
|
38
|
0 |
0 |
unless $opts{'key_file'} |
|
39
|
0 |
0 |
unless -f $opts{'cert_file'} |
|
40
|
0 |
0 |
unless -f $opts{'key_file'} |
|
44
|
0 |
42 |
if ($opts{'http2'}) |
|
45
|
0 |
0 |
unless $opts{'tls'} |
|
46
|
0 |
0 |
unless $HAS_HTTP2 |
|
100
|
0 |
42 |
$opts{'tls'} ? : |
|
141
|
0 |
4 |
unless $path =~ m[^/] |
|
142
|
0 |
4 |
unless ref $handler eq "CODE" |
|
165
|
2 |
3 |
if ($path =~ /$pattern/) |
|
171
|
1 |
0 |
if defined $captures[$i] |
|
195
|
0 |
0 |
unless $url_prefix =~ m[^/] |
|
196
|
0 |
0 |
unless -d $directory |
|
275
|
0 |
0 |
unless ref $handler eq "CODE" or $is_builder |
|
284
|
0 |
0 |
unless ref $handler eq "CODE" or $is_builder |
|
360
|
0 |
0 |
unless (Hypersonic::Compress::check_zlib()) |
|
378
|
1 |
48 |
unless $path =~ m[^/] |
|
379
|
1 |
47 |
unless ref $handler eq "CODE" |
|
394
|
13 |
34 |
if (ref $opts eq "HASH") |
|
395
|
6 |
7 |
$opts->{'dynamic'} ? : |
|
398
|
9 |
0 |
$opts->{$feat} ? : |
|
|
9 |
95 |
if exists $opts->{$feat} |
|
408
|
5 |
53 |
if ($segments[$i] =~ /^:(\w+)$/) |
|
415
|
7 |
40 |
if ($features{'streaming'}) |
|
420
|
0 |
47 |
if ($features{'need_xs_builder'}) |
|
445
|
1 |
16 |
unless @{$self->{'routes'};} or @{$self->{'static_dirs'} // [];} |
|
446
|
1 |
15 |
if $self->{'compiled'} |
|
451
|
0 |
15 |
if (my $static_dirs = $self->{'static_dirs'}) |
|
487
|
6 |
24 |
if ($route->{'dynamic'}) { } |
|
490
|
3 |
3 |
if ($route->{'method'} =~ /^(POST|PUT|PATCH)$/) |
|
499
|
0 |
6 |
if $f->{'parse_query'} |
|
500
|
0 |
6 |
if $f->{'parse_headers'} |
|
501
|
0 |
6 |
if $f->{'parse_cookies'} |
|
502
|
1 |
5 |
if $f->{'parse_json'} |
|
503
|
0 |
6 |
if $f->{'parse_form'} |
|
504
|
0 |
6 |
if $f->{'response_helpers'} |
|
505
|
2 |
4 |
if $f->{'streaming'} |
|
506
|
0 |
6 |
if $f->{'need_xs_builder'} |
|
510
|
6 |
0 |
if ($handler_code) |
|
512
|
0 |
6 |
if $handler_code =~ /\{['"]*query['"]*\}/ |
|
513
|
0 |
6 |
if $handler_code =~ /\{['"]*headers['"]*\}/ |
|
514
|
0 |
6 |
if $handler_code =~ /\{['"]*cookies['"]*\}/ |
|
515
|
0 |
6 |
if $handler_code =~ /\{['"]*json['"]*\}/ |
|
516
|
0 |
6 |
if $handler_code =~ /\{['"]*form['"]*\}/ |
|
522
|
0 |
30 |
if (@{$route->{'params'};}) |
|
527
|
0 |
30 |
if (@{$route->{'before'};} or @{$route->{'after'};}) |
|
533
|
1 |
14 |
if ($self->{'_session_enabled'}) |
|
538
|
0 |
15 |
if ($self->{'_compression_enabled'}) |
|
546
|
0 |
15 |
if ($self->{'_async_enabled'}) |
|
547
|
0 |
0 |
if ($^O eq 'MSWin32') { } |
|
559
|
0 |
1 |
if (builtin::blessed($mw) and $mw->can('build_before') || $mw->can('build_after')) { } |
|
566
|
0 |
1 |
if (builtin::blessed($mw) and $mw->can('build_before') || $mw->can('build_after')) { } |
|
589
|
0 |
0 |
unless $mw->can("slot_requirements") |
|
592
|
0 |
0 |
if exists $middleware_slots{$name} |
|
608
|
13 |
2 |
if (@methods == 1) |
|
614
|
7 |
8 |
if (@paths > 1) |
|
616
|
0 |
7 |
if (length $prefix > 1) |
|
639
|
24 |
6 |
if (not $route->{'dynamic'}) { } |
|
641
|
0 |
24 |
if ($route->{'_static_file'}) |
|
648
|
0 |
24 |
if ($route->{'need_xs_builder'}) |
|
661
|
1 |
23 |
if (ref $result eq 'ARRAY') { } |
|
|
8 |
15 |
elsif (ref $result eq 'HASH') { } |
|
675
|
1 |
23 |
unless defined $body and not ref $body |
|
680
|
23 |
0 |
$self->{'enable_security_headers'} ? : |
|
706
|
2 |
12 |
if ($self->{'route_analysis'}{'needs_streaming'}) |
|
709
|
2 |
2 |
unless $route->{'dynamic'} |
|
710
|
2 |
0 |
$route->{'streaming'} ? : |
|
716
|
0 |
14 |
if ($self->_has_websocket_routes) |
|
723
|
0 |
0 |
if ($route->{'opts'}{'rooms'}) |
|
737
|
0 |
14 |
if ($self->{'websocket_rooms'}) |
|
743
|
0 |
14 |
if ($analysis->{'has_route_middleware'}) |
|
747
|
0 |
0 |
unless $route->{'dynamic'} |
|
758
|
1 |
13 |
if ($analysis->{'has_global_before'} or $analysis->{'has_global_after'}) |
|
793
|
14 |
0 |
defined $Config::Config{'archname'} ? : |
|
796
|
14 |
0 |
if (eval {
do {
require Digest::MD5;
1
}
}) { } |
|
822
|
2 |
12 |
if ($self->{'route_analysis'}{'needs_streaming'}) |
|
828
|
0 |
14 |
if ($self->{'route_analysis'}{'needs_websocket'}) |
|
834
|
0 |
14 |
if ($self->{'route_analysis'}{'needs_websocket_handler'}) |
|
840
|
0 |
14 |
if ($self->{'route_analysis'}{'needs_websocket_rooms'}) |
|
846
|
0 |
14 |
if ($self->{'route_analysis'}{'needs_async_pool'}) |
|
856
|
0 |
14 |
if (my $xsr = $self->{'_xs_builder_routes'}) |
|
861
|
0 |
0 |
if ($result->{'xs_functions'}) |
|
875
|
0 |
14 |
if ($self->{'tls'}) |
|
881
|
0 |
14 |
if ($self->{'http2'}) |
|
890
|
0 |
14 |
if ($self->{'_compression_enabled'}) |
|
898
|
0 |
14 |
if ($self->{'route_analysis'}{'needs_async_pool'}) |
|
904
|
14 |
0 |
if ($self->{'_event_backend'}) |
|
906
|
14 |
0 |
if ($backend->can("extra_cflags")) |
|
908
|
0 |
14 |
if $ev_cflags |
|
911
|
14 |
0 |
if ($backend->can("extra_ldflags")) |
|
913
|
0 |
14 |
if $ev_ldflags |
|
921
|
0 |
14 |
if ($^O eq "MSWin32") |
|
923
|
0 |
0 |
unless $ld =~ /-lws2_32\b/ |
|
931
|
14 |
0 |
if ($ENV{'HYPERSONIC_COMPILE_DIAG'} or $ENV{'AUTOMATED_TESTING'}) |
|
950
|
0 |
14 |
unless $ok |
|
963
|
0 |
14 |
unless defined &{"${module_name}::dispatch";} |
|
968
|
0 |
14 |
if ($self->{'route_analysis'}{'needs_async_pool'}) |
|
1039
|
0 |
14 |
if ($self->{'_compression_enabled'}) |
|
1045
|
0 |
14 |
if ($self->{'tls'}) |
|
1051
|
0 |
14 |
if ($self->{'http2'}) |
|
1070
|
3 |
11 |
if ($self->{'enable_security_headers'} and $has_dynamic) |
|
1096
|
0 |
14 |
if (my $helpers = $self->{'c_helpers'}) |
|
1098
|
0 |
0 |
if (ref $helpers eq 'CODE') { } |
|
1128
|
0 |
14 |
if ($self->{'_compression_enabled'}) |
|
1199
|
0 |
14 |
if ($self->{'tls'}) |
|
1212
|
0 |
14 |
if ($self->{'http2'}) |
|
1228
|
2 |
12 |
if ($analysis->{'needs_streaming'}) |
|
1242
|
0 |
14 |
if ($analysis->{'needs_websocket'}) |
|
1259
|
0 |
14 |
if ($analysis->{'needs_websocket_handler'}) |
|
1267
|
0 |
14 |
if ($analysis->{'needs_websocket_rooms'}) |
|
1276
|
0 |
14 |
if ($analysis->{'needs_async_pool'}) |
|
1290
|
0 |
14 |
if ($analysis->{'needs_xs_builder'}) |
|
1294
|
0 |
0 |
unless $route->{'need_xs_builder'} |
|
1303
|
0 |
0 |
unless ref $result eq "HASH" and $result->{'xs_function'} |
|
1316
|
0 |
0 |
if (@xs_builder_routes) |
|
1330
|
0 |
14 |
if ($analysis->{'needs_websocket'}) |
|
1337
|
3 |
11 |
if ($has_dynamic) |
|
1343
|
1 |
2 |
if ($analysis->{'has_any_middleware'}) |
|
1381
|
2 |
0 |
if ($analysis->{'needs_streaming'} and $self->{'_streaming_flags'}) |
|
1391
|
0 |
0 |
if ($analysis->{'needs_websocket'} and $self->{'_websocket_paths'}) |
|
1401
|
0 |
0 |
$i < $#paths ? : |
|
1421
|
14 |
0 |
$self->{'enable_security_headers'} ? : |
|
1433
|
3 |
11 |
if ($self->{'enable_security_headers'} and $has_dynamic) |
|
1439
|
3 |
11 |
if ($has_dynamic) |
|
1445
|
0 |
0 |
if ($analysis->{'needs_xs_builder'} and $self->{'_xs_builder_routes'} and @{$self->{'_xs_builder_routes'};}) |
|
1451
|
0 |
14 |
if ($analysis->{'needs_websocket'}) |
|
1479
|
23 |
6 |
if (not $r->{'dynamic'}) { } |
|
1494
|
0 |
6 |
if ($r->{'need_xs_builder'} and $r->{'_xs_result'}) { } |
|
|
0 |
6 |
elsif ($path =~ /:(\w+)/) { } |
|
1498
|
0 |
0 |
if ($path =~ /:(\w+)/) { } |
|
1692
|
3 |
11 |
if ($has_dynamic) { } |
|
1705
|
1 |
2 |
if ($analysis->{'has_any_middleware'}) |
|
1710
|
1 |
0 |
if ($analysis->{'has_global_before'}) |
|
1717
|
1 |
0 |
if ($analysis->{'has_global_after'}) |
|
1726
|
0 |
1 |
if ($analysis->{'has_route_middleware'}) |
|
1747
|
0 |
14 |
if ($analysis->{'needs_websocket'}) |
|
1771
|
0 |
14 |
if ($self->{'tls'}) |
|
1792
|
0 |
14 |
if ($analysis->{'needs_async_pool'}) |
|
1801
|
0 |
14 |
if ($backend_name eq 'kqueue') { } |
|
|
14 |
0 |
elsif ($backend_name eq 'epoll') { } |
|
|
0 |
0 |
elsif ($backend_name eq 'io_uring') { } |
|
1932
|
0 |
14 |
if ($analysis->{'needs_async_pool'}) |
|
1960
|
0 |
14 |
if ($analysis->{'needs_websocket'}) |
|
1975
|
0 |
14 |
if ($analysis->{'needs_websocket'}) |
|
1988
|
0 |
14 |
if ($analysis->{'needs_websocket'}) |
|
2001
|
3 |
11 |
if ($has_dynamic) { } |
|
2003
|
0 |
3 |
if ($analysis->{'needs_xs_builder'} and $self->{'_xs_builder_routes'} and @{$self->{'_xs_builder_routes'};}) { } |
|
2051
|
0 |
14 |
if ($analysis->{'needs_websocket'}) |
|
2065
|
0 |
14 |
if ($analysis->{'needs_async_pool'}) |
|
2083
|
0 |
0 |
unless @$xs_routes |
|
2181
|
0 |
3 |
if ($analysis->{'needs_query'} or $analysis->{'needs_form'}) |
|
2241
|
0 |
2 |
if ($analysis->{'needs_headers'} or $analysis->{'needs_cookies'} or $analysis->{'needs_json'} or $analysis->{'needs_form'}) |
|
2278
|
0 |
3 |
if ($analysis->{'has_builder_before'} or $analysis->{'has_builder_after'}) |
|
2283
|
0 |
0 |
if $seen_classes{$class}++ |
|
2284
|
0 |
0 |
if ($mw->can("build_helpers")) |
|
2292
|
1 |
2 |
if ($analysis->{'has_any_middleware'}) |
|
2417
|
0 |
3 |
if ($analysis->{'needs_query'}) { } |
|
2441
|
1 |
2 |
if ($needs_header_parse) { } |
|
2449
|
1 |
0 |
if ($analysis->{'needs_cookies'}) { } |
|
2484
|
1 |
0 |
if ($analysis->{'needs_form'} or $analysis->{'needs_json'}) { } |
|
2491
|
0 |
1 |
if ($analysis->{'needs_form'}) { } |
|
2503
|
1 |
0 |
if ($analysis->{'needs_json'}) { } |
|
2557
|
0 |
3 |
if ($analysis->{'has_builder_before'}) |
|
2566
|
0 |
0 |
if ($mw->can("build_before")) |
|
2573
|
1 |
2 |
if ($analysis->{'has_global_before'}) |
|
2587
|
0 |
3 |
if ($analysis->{'has_route_middleware'}) |
|
2607
|
2 |
1 |
if ($analysis->{'needs_streaming'}) |
|
2630
|
1 |
2 |
if ($analysis->{'has_any_middleware'}) { } |
|
2638
|
0 |
1 |
if ($analysis->{'needs_streaming'}) |
|
2653
|
2 |
0 |
if ($analysis->{'needs_streaming'}) |
|
2663
|
0 |
3 |
if ($analysis->{'has_route_middleware'}) |
|
2682
|
1 |
2 |
if ($analysis->{'has_global_after'}) |
|
2695
|
0 |
3 |
if ($analysis->{'has_builder_after'}) |
|
2705
|
0 |
0 |
if ($mw->can("build_after")) |
|
2712
|
2 |
1 |
if ($analysis->{'needs_streaming'}) |
|
2739
|
1 |
2 |
if ($analysis->{'has_any_middleware'}) { } |
|
2800
|
0 |
3 |
if ($self->{'_compression_enabled'}) |
|
2913
|
1 |
2 |
if ($analysis->{'has_any_middleware'}) { } |
|
3183
|
0 |
6 |
unless ref $coderef eq "CODE" |
|
3186
|
3 |
3 |
unless $DEPARSER |
|
3190
|
0 |
6 |
$@ ? : |
|
3196
|
0 |
7 |
unless @paths |
|
3197
|
0 |
7 |
if @paths == 1 |
|
3203
|
0 |
44 |
if $prefix eq "" |
|
3208
|
0 |
7 |
if (not $prefix =~ m[/$] and $prefix =~ m[^(.*/)[^/]+$]) |
|
3273
|
0 |
0 |
unless -f $_ |
|
3283
|
0 |
0 |
unless open my $fh, "<:raw", $file_path |
|
3293
|
0 |
0 |
if ($gen_etag) |
|
3327
|
0 |
0 |
if $max_age |
|
3328
|
0 |
0 |
if $etag |
|
3331
|
0 |
0 |
if ($self->{'enable_security_headers'}) |
|
3363
|
120 |
160 |
unless defined $value and length $value |
|
3373
|
0 |
3 |
unless $self->{'enable_security_headers'} |
|
3376
|
0 |
3 |
unless length $headers |
|
3385
|
1 |
30 |
unless $self->{'compiled'} |
|
3392
|
1 |
0 |
unless $self->{'compiled'} |
|
3403
|
0 |
0 |
if ($^O eq "MSWin32" and $workers > 1) |
|
3409
|
0 |
0 |
$self->{'tls'} ? : |
|
|
0 |
0 |
$self->{'http2'} ? : |
|
3415
|
0 |
0 |
if ($workers > 1) |
|
3418
|
0 |
0 |
unless (defined $pid) |
|
3421
|
0 |
0 |
if ($pid == 0) |
|
3424
|
0 |
0 |
if $listen_fd < 0 |
|
3433
|
0 |
0 |
if $listen_fd < 0 |