From 871989eef53663285c165fdfb83a5918ebe00d41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 30 Oct 2018 10:03:17 +0100 Subject: Switch to cow_http2_machine for HTTP/2 A common state machine for Gun and Cowboy will be easier to maintain. This fixes numerous issues including some test failures that were hidden because the h2specd_SUITE was flawed. We temporarily depend on Cowlib master until a new version is released. --- src/gun.erl | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/gun.erl') diff --git a/src/gun.erl b/src/gun.erl index 1659ee3..16349e1 100644 --- a/src/gun.erl +++ b/src/gun.erl @@ -845,6 +845,9 @@ loop(State=#state{parent=Parent, owner=Owner, owner_ref=OwnerRef, {system, From, Request} -> sys:handle_system_msg(Request, From, Parent, ?MODULE, [], {loop, State}); + %% @todo HTTP/2 requires more timeouts than just the keepalive timeout. + %% We should have a timeout function in protocols that deal with + %% received timeouts. Currently the timeout messages are ignored. {ws_upgrade, _, StreamRef, _, _} -> Owner ! {gun_error, self(), StreamRef, {badstate, "Websocket is only supported over HTTP/1.1."}}, -- cgit v1.2.3