Browse Source

Improve trailers test when no te header is sent

Loïc Hoguin 7 years ago
parent
commit
9969684035
1 changed files with 4 additions and 1 deletions
  1. 4 1
      test/req_SUITE.erl

+ 4 - 1
test/req_SUITE.erl

@@ -855,13 +855,16 @@ stream_trailers(Config) ->
 	ok.
 
 stream_trailers_no_te(Config) ->
-	doc("Stream body followed by trailer headers."),
+	doc("Stream body followed by trailer headers without a te header in the request."),
 	ConnPid = gun_open(Config),
 	Ref = gun:get(ConnPid, "/resp/stream_trailers", [
 		{<<"accept-encoding">>, <<"gzip">>}
 	]),
 	{response, nofin, 200, RespHeaders} = gun:await(ConnPid, Ref),
+	%% @todo Do we want to remove the trailer header automatically?
+%	false = lists:keyfind(<<"trailer">>, 1, RespHeaders),
 	{ok, RespBody} = gun:await_body(ConnPid, Ref),
+	<<"Hello world!">> = do_decode(RespHeaders, RespBody),
 	gun:close(ConnPid).
 
 do_trailers(Path, Config) ->