From 01e13c0846a15a1f18ac586b68a6b9e6feb5c692 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Mon, 11 Dec 2017 17:43:02 +0100 Subject: Fix how we require HTTP/1.0 from Gun in rfc7231_SUITE --- test/rfc7231_SUITE.erl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'test/rfc7231_SUITE.erl') diff --git a/test/rfc7231_SUITE.erl b/test/rfc7231_SUITE.erl index 5b5adeb..fac9903 100644 --- a/test/rfc7231_SUITE.erl +++ b/test/rfc7231_SUITE.erl @@ -19,6 +19,7 @@ -import(ct_helper, [config/2]). -import(ct_helper, [doc/1]). -import(cowboy_test, [gun_open/1]). +-import(cowboy_test, [gun_open/2]). -import(cowboy_test, [raw_open/1]). -import(cowboy_test, [raw_send/2]). -import(cowboy_test, [raw_recv_head/1]). @@ -241,7 +242,7 @@ do_http10_expect(Config) -> doc("A server that receives a 100-continue expectation " "in an HTTP/1.0 request must ignore it. (RFC7231 5.1.1)"), Body = <<"hello=world">>, - ConnPid = gun_open([{http_opts, #{version => 'HTTP/1.0'}}|Config]), + ConnPid = gun_open(Config, #{http_opts => #{version => 'HTTP/1.0'}}), Ref = gun:post(ConnPid, "/echo/read_body", [ {<<"accept-encoding">>, <<"gzip">>}, {<<"content-type">>, <<"application/x-www-form-urlencoded">>}, @@ -437,7 +438,7 @@ http10_status_code_101(Config) -> end. do_http10_status_code_1xx(StatusCode, Config) -> - ConnPid = gun_open([{http_opts, #{version => 'HTTP/1.0'}}|Config]), + ConnPid = gun_open(Config, #{http_opts => #{version => 'HTTP/1.0'}}), Ref = gun:get(ConnPid, "/resp/inform2/" ++ integer_to_list(StatusCode), [ {<<"accept-encoding">>, <<"gzip">>} ]), -- cgit v1.2.3