aboutsummaryrefslogtreecommitdiffstats
path: root/test/http_SUITE_data/http_loop_stream_recv.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/http_SUITE_data/http_loop_stream_recv.erl')
-rw-r--r--test/http_SUITE_data/http_loop_stream_recv.erl10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/http_SUITE_data/http_loop_stream_recv.erl b/test/http_SUITE_data/http_loop_stream_recv.erl
index 9f7646a..ce0d1da 100644
--- a/test/http_SUITE_data/http_loop_stream_recv.erl
+++ b/test/http_SUITE_data/http_loop_stream_recv.erl
@@ -14,12 +14,12 @@ info(stream, Req, undefined) ->
stream(Req, 1, <<>>).
stream(Req, ID, Acc) ->
- case cowboy_req:stream_body(Req) of
- {ok, Data, Req2} ->
- parse_id(Req2, ID, << Acc/binary, Data/binary >>);
- {done, Req2} ->
+ case cowboy_req:body(Req) of
+ {ok, <<>>, Req2} ->
{ok, Req3} = cowboy_req:reply(200, Req2),
- {ok, Req3, undefined}
+ {ok, Req3, undefined};
+ {_, Data, Req2} ->
+ parse_id(Req2, ID, << Acc/binary, Data/binary >>)
end.
parse_id(Req, ID, Data) ->