diff options
author | Loïc Hoguin <[email protected]> | 2017-02-26 13:23:31 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2017-02-26 13:23:31 +0100 |
commit | 07cde7c6def6eeed0174b270229e7d5175673d87 (patch) | |
tree | 86fc57c3383257c5dd7db45d9c17fc12108c84c7 /src/cow_http2.erl | |
parent | 462c01f808dccec8ce00ea53b02146894c0dbc6c (diff) | |
download | cowlib-07cde7c6def6eeed0174b270229e7d5175673d87.tar.gz cowlib-07cde7c6def6eeed0174b270229e7d5175673d87.tar.bz2 cowlib-07cde7c6def6eeed0174b270229e7d5175673d87.zip |
Unknown HTTP/2 frames are ignored
Diffstat (limited to 'src/cow_http2.erl')
-rw-r--r-- | src/cow_http2.erl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cow_http2.erl b/src/cow_http2.erl index 91e6985..460e6f1 100644 --- a/src/cow_http2.erl +++ b/src/cow_http2.erl @@ -251,6 +251,11 @@ parse(<< _:24, 9:8, _:9, 0:31, _/bits >>) -> parse(<< Len:24, 9:8, _:5, FlagEndHeaders:1, _:3, StreamID:31, HeaderBlockFragment:Len/binary, Rest/bits >>) -> {ok, {continuation, StreamID, parse_head_fin(FlagEndHeaders), HeaderBlockFragment}, Rest}; %% +%% Unknown frames are ignored. +%% +parse(<< Len:24, Type:8, _:40, _:Len/binary, Rest/bits >>) when Type > 9 -> + {ignore, Rest}; +%% %% Incomplete frames. %% parse(_) -> |