diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cow_http2.erl | 8 | ||||
-rw-r--r-- | src/cow_ws.erl | 2 | ||||
-rw-r--r-- | src/cowlib.app.src | 26 |
3 files changed, 5 insertions, 31 deletions
diff --git a/src/cow_http2.erl b/src/cow_http2.erl index a4d2e23..c7773b4 100644 --- a/src/cow_http2.erl +++ b/src/cow_http2.erl @@ -82,7 +82,7 @@ parse(<< Len0:24, 0:8, _:4, 1:1, _:2, FlagEndStream:1, _:1, StreamID:31, PadLen: when byte_size(Rest0) >= Len0 - 1 -> Len = Len0 - PadLen, case Rest0 of - << Data:Len/binary, 0:PadLen/binary, Rest/bits >> -> + << Data:Len/binary, 0:PadLen/unit:8, Rest/bits >> -> {ok, {data, StreamID, parse_fin(FlagEndStream), Data}, Rest}; _ -> {connection_error, protocol_error, 'Padding octets MUST be set to zero. (RFC7540 6.1)'} @@ -105,7 +105,7 @@ parse(<< Len0:24, 1:8, _:2, 0:1, _:1, 1:1, FlagEndHeaders:1, _:1, FlagEndStream: PadLen:8, Rest0/bits >>) when byte_size(Rest0) >= Len0 - 1 -> Len = Len0 - PadLen - 1, case Rest0 of - << HeaderBlockFragment:Len/binary, 0:PadLen/binary, Rest/bits >> -> + << HeaderBlockFragment:Len/binary, 0:PadLen/unit:8, Rest/bits >> -> {ok, {headers, StreamID, parse_fin(FlagEndStream), parse_head_fin(FlagEndHeaders), HeaderBlockFragment}, Rest}; _ -> {connection_error, protocol_error, 'Padding octets MUST be set to zero. (RFC7540 6.2)'} @@ -122,7 +122,7 @@ parse(<< Len0:24, 1:8, _:2, 1:1, _:1, 1:1, FlagEndHeaders:1, _:1, FlagEndStream: PadLen:8, E:1, DepStreamID:31, Weight:8, Rest0/bits >>) when byte_size(Rest0) >= Len0 - 6 -> Len = Len0 - PadLen - 6, case Rest0 of - << HeaderBlockFragment:Len/binary, 0:PadLen/binary, Rest/bits >> -> + << HeaderBlockFragment:Len/binary, 0:PadLen/unit:8, Rest/bits >> -> {ok, {headers, StreamID, parse_fin(FlagEndStream), parse_head_fin(FlagEndHeaders), parse_exclusive(E), DepStreamID, Weight + 1, HeaderBlockFragment}, Rest}; _ -> @@ -177,7 +177,7 @@ parse(<< Len0:24, 5:8, _:4, 1:1, FlagEndHeaders:1, _:2, StreamID:31, PadLen:8, _ when byte_size(Rest0) >= Len0 - 5 -> Len = Len0 - 5, case Rest0 of - << HeaderBlockFragment:Len/binary, 0:PadLen/binary, Rest/bits >> -> + << HeaderBlockFragment:Len/binary, 0:PadLen/unit:8, Rest/bits >> -> {ok, {push_promise, StreamID, parse_head_fin(FlagEndHeaders), PromisedStreamID, HeaderBlockFragment}, Rest}; _ -> {connection_error, protocol_error, 'Padding octets MUST be set to zero. (RFC7540 6.6)'} diff --git a/src/cow_ws.erl b/src/cow_ws.erl index c89c17a..611bfef 100644 --- a/src/cow_ws.erl +++ b/src/cow_ws.erl @@ -315,7 +315,7 @@ frag_state(_, 1, _, FragState) -> FragState. %% Empty last frame of compressed message. parse_payload(Data, _, Utf8State, _, _, 0, {fin, _, << 1:1, 0:2 >>}, #{inflate := Inflate, inflate_takeover := TakeOver}, _) -> - zlib:inflate(Inflate, << 0, 0, 255, 255 >>), + _ = zlib:inflate(Inflate, << 0, 0, 255, 255 >>), case TakeOver of no_takeover -> zlib:inflateReset(Inflate); takeover -> ok diff --git a/src/cowlib.app.src b/src/cowlib.app.src deleted file mode 100644 index 6ae73b5..0000000 --- a/src/cowlib.app.src +++ /dev/null @@ -1,26 +0,0 @@ -%% Copyright (c) 2013-2015, Loïc Hoguin <[email protected]> -%% -%% Permission to use, copy, modify, and/or distribute this software for any -%% purpose with or without fee is hereby granted, provided that the above -%% copyright notice and this permission notice appear in all copies. -%% -%% THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -%% WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -%% MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR -%% ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -%% WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -%% ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF -%% OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - -{application, cowlib, [ - {description, "Support library for manipulating Web protocols."}, - {vsn, "1.3.0"}, - {id, "git"}, - {modules, []}, - {registered, []}, - {applications, [ - kernel, - stdlib, - crypto - ]} -]}. |