| 1 | package Protocol::HTTP2::Frame::Continuation; | ||||||||||||||||||||||||||||||||
| 2 | 13 | ▶ | use strict; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 3 | 13 | ▶ | use warnings; | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 4 | 13 | ▶ | use Protocol::HTTP2::Constants qw(:flags :errors :settings); | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 5 | 13 | ▶ | use Protocol::HTTP2::Trace qw(tracer); | ||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||||||
| 7 | 1 | ▶ | sub decode { | ||||||||||||||||||||||||||||||
|
Subroutine
decode: called CC=6 SCAR=22.5
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 8 | 1 | my ( $con, $buf_ref, $buf_offset, $length ) = @_; | |||||||||||||||||||||||||||||||
| 9 | 1 | my $frame_ref = $con->decode_context->{frame}; | |||||||||||||||||||||||||||||||
| 10 | |||||||||||||||||||||||||||||||||
| 11 | # Protocol errors | ||||||||||||||||||||||||||||||||
| 12 | 1 | ▶ | if ( | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 13 | # CONTINUATION frames MUST be associated with a stream | ||||||||||||||||||||||||||||||||
| 14 | $frame_ref->{stream} == 0 | ||||||||||||||||||||||||||||||||
| 15 | ) | ||||||||||||||||||||||||||||||||
| 16 | { | ||||||||||||||||||||||||||||||||
| 17 | 0 | $con->error(PROTOCOL_ERROR); | |||||||||||||||||||||||||||||||
| 18 | 0 | return undef; | |||||||||||||||||||||||||||||||
| 19 | } | ||||||||||||||||||||||||||||||||
| 20 | 1 | ▶ | if ( | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 21 | # Headers compressed size already exceeded decompressed limit | ||||||||||||||||||||||||||||||||
| 22 | length( $con->stream_header_block( $frame_ref->{stream} ) ) + $length > | ||||||||||||||||||||||||||||||||
| 23 | $con->dec_setting(SETTINGS_MAX_HEADER_LIST_SIZE) | ||||||||||||||||||||||||||||||||
| 24 | ) | ||||||||||||||||||||||||||||||||
| 25 | { | ||||||||||||||||||||||||||||||||
| 26 | 0 | $con->error(ENHANCE_YOUR_CALM); | |||||||||||||||||||||||||||||||
| 27 | 0 | return undef; | |||||||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||
| 30 | $con->stream_header_block_add( $frame_ref->{stream}, | ||||||||||||||||||||||||||||||||
| 31 | 1 | ▶ | substr( $$buf_ref, $buf_offset, $length ) ) | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||
| 32 | or return undef; | ||||||||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||||||||
| 34 | # Stream header block complete | ||||||||||||||||||||||||||||||||
| 35 | $con->stream_headers_done( $frame_ref->{stream} ) | ||||||||||||||||||||||||||||||||
| 36 | or return undef | ||||||||||||||||||||||||||||||||
| 37 | 1 | ▶ | if $frame_ref->{flags} & END_HEADERS; | ||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition40%2/5
$frame_ref->{'flags'} & 4 && ($con->stream_headers_done($frame_ref->{'stream'}) || (return undef))
$con->stream_headers_done($frame_ref->{"stream"}) or return undef
MC/DC0%0/2
$frame_ref->{'flags'} & 4 && ($con->stream_headers_done($frame_ref->{'stream'}) || (return undef))
$frame_ref->{'flags'} & 4
$con->stream_headers_done($frame_ref->{"stream"})
Truth table0%0/3
A && B
A= $frame_ref->{'flags'} & 4B= $con->stream_headers_done($frame_ref->{"stream"})
| |||||||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||||||
| 39 | 1 | return $length; | |||||||||||||||||||||||||||||||
| 40 | |||||||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||||||
| 43 | 3 | ▶ | sub encode { | ||||||||||||||||||||||||||||||
|
Subroutine
encode: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||
| 44 | 3 | my ( $con, $flags_ref, $stream, $data_ref ) = @_; | |||||||||||||||||||||||||||||||
| 45 | 3 | return $$data_ref; | |||||||||||||||||||||||||||||||
| 46 | } | ||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||
| 48 | 13 | 1; | |||||||||||||||||||||||||||||||