diff options
author | Loïc Hoguin <[email protected]> | 2018-10-26 10:18:57 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2018-10-26 10:23:28 +0200 |
commit | e1d970b5eb02dbd68c249ae1c7bd8acaf6a938a9 (patch) | |
tree | f6137224cb03612c5574cf8da8caf8ac85c12a17 /test | |
parent | 331084911589a0195dc0eaf9e781a29509232bc6 (diff) | |
download | cowboy-e1d970b5eb02dbd68c249ae1c7bd8acaf6a938a9.tar.gz cowboy-e1d970b5eb02dbd68c249ae1c7bd8acaf6a938a9.tar.bz2 cowboy-e1d970b5eb02dbd68c249ae1c7bd8acaf6a938a9.zip |
Switch cowboy_http2 to the new cow_http2_machine
The new module is a merge of the Cowboy and Gun HTTP/2
state machines. Using a common code will help future
developments rather than duplicating the work.
A notable change is in how streams are terminated
when the handler stops before the body is sent. The
cowboy_stream:terminate function is now called only
after the body has been sent fully (or the stream
is reset in-between), not when the stop command is
returned. This will most likely have an impact on
metrics but will be closer to reality.
I had to comment a broken test in rfc7231_SUITE that
was cheating, cheating is no longer possible.
This depends on Cowlib master for the time being. A
new Cowlib version will be released once both Cowboy
and Gun are ported to use cow_http2_machine and I'm
satisfied with it.
Diffstat (limited to 'test')
-rw-r--r-- | test/rfc7231_SUITE.erl | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/test/rfc7231_SUITE.erl b/test/rfc7231_SUITE.erl index fac9903..2bd5bb1 100644 --- a/test/rfc7231_SUITE.erl +++ b/test/rfc7231_SUITE.erl @@ -150,14 +150,16 @@ method_delete(Config) -> {ok, <<"DELETE">>} = gun:await_body(ConnPid, Ref), ok. -method_connect(Config) -> - doc("The CONNECT method is currently not implemented. (RFC7231 4.3.6)"), - ConnPid = gun_open(Config), - Ref = gun:request(ConnPid, <<"CONNECT">>, "localhost:8080", [ - {<<"accept-encoding">>, <<"gzip">>} - ]), - {response, fin, 501, _} = gun:await(ConnPid, Ref), - ok. +%% @todo This test is currently broken because Gun does not +%% send a proper CONNECT request. +%method_connect(Config) -> +% doc("The CONNECT method is currently not implemented. (RFC7231 4.3.6)"), +% ConnPid = gun_open(Config), +% Ref = gun:request(ConnPid, <<"CONNECT">>, "localhost:8080", [ +% {<<"accept-encoding">>, <<"gzip">>} +% ]), +% {response, fin, 501, _} = gun:await(ConnPid, Ref), +% ok. % A client sending a CONNECT request MUST send the authority form of % request-target (Section 5.3 of [RFC7230]); i.e., the request-target |