From 941d408ea40022da3148b5b96483d5e8f95caaa4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Wed, 23 Dec 2020 17:50:12 +0100 Subject: Initial HTTP/3 and QPACK implementation Cowlib now uses GitHub Actions for CI. As a result of this change, Cowlib is tested against OTP-24+. This commit adds initial implementations of cow_http3, cow_http3_machine and cow_qpack. Because QPACK is similar to HPACK, some encoding and decoding functions were moved to a common include file, particularly the huffman functions. The cow_http module now contains the types and functions common to all or most versions of HTTP. The types and functions specific to HTTP/1 were moved to the new cow_http1 module. Because HTTP/3 is similar to HTTP/2, part of the code processing headers is common and can be found in cow_http. Other functions common to both versions were moved out of cow_http2_machine. This commit updates comments indicating that the HTTP/2 PRIORITY mechanism will no longer be implemented. --- src/cow_http2.erl | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/cow_http2.erl') diff --git a/src/cow_http2.erl b/src/cow_http2.erl index 2925e37..68f3625 100644 --- a/src/cow_http2.erl +++ b/src/cow_http2.erl @@ -39,9 +39,6 @@ -type streamid() :: pos_integer(). -export_type([streamid/0]). --type fin() :: fin | nofin. --export_type([fin/0]). - -type head_fin() :: head_fin | head_nofin. -export_type([head_fin/0]). @@ -66,9 +63,10 @@ | unknown_error. -export_type([error/0]). --type frame() :: {data, streamid(), fin(), binary()} - | {headers, streamid(), fin(), head_fin(), binary()} - | {headers, streamid(), fin(), head_fin(), exclusive(), streamid(), weight(), binary()} +-type frame() :: {data, streamid(), cow_http:fin(), binary()} + | {headers, streamid(), cow_http:fin(), head_fin(), binary()} + | {headers, streamid(), cow_http:fin(), head_fin(), + exclusive(), streamid(), weight(), binary()} | {priority, streamid(), exclusive(), streamid(), weight()} | {rst_stream, streamid(), error()} | {settings, settings()} -- cgit v1.2.3