diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/cow_http2.erl | 8 | ||||
-rw-r--r-- | src/cow_multipart.erl | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/cow_http2.erl b/src/cow_http2.erl index 460e6f1..efc3ad8 100644 --- a/src/cow_http2.erl +++ b/src/cow_http2.erl @@ -31,6 +31,8 @@ -export([ping/1]). -export([ping_ack/1]). -export([goaway/3]). +-export([window_update/1]). +-export([window_update/2]). -type streamid() :: pos_integer(). -type fin() :: fin | nofin. @@ -389,6 +391,12 @@ goaway(LastStreamID, Reason, DebugData) -> Len = iolist_size(DebugData) + 8, [<< Len:24, 7:8, 0:41, LastStreamID:31, ErrorCode:32 >>, DebugData]. +window_update(Increment) -> + window_update(0, Increment). + +window_update(StreamID, Increment) when Increment =< 16#7fffffff -> + << 4:24, 8:8, 0:8, StreamID:32, 0:1, Increment:31 >>. + flag_fin(nofin) -> 0; flag_fin(fin) -> 1. diff --git a/src/cow_multipart.erl b/src/cow_multipart.erl index 3cbef56..e86afcc 100644 --- a/src/cow_multipart.erl +++ b/src/cow_multipart.erl @@ -538,6 +538,7 @@ form_data(Headers) -> false -> <<"text/plain">>; {_, T} -> T end, + %% @todo Turns out this is unnecessary per RFC7578 4.7. TransferEncoding = case lists:keyfind( <<"content-transfer-encoding">>, 1, Headers) of false -> <<"7bit">>; |