aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_http_req.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl
index 5a1ec2b..5f71018 100644
--- a/src/cowboy_http_req.erl
+++ b/src/cowboy_http_req.erl
@@ -153,7 +153,8 @@ body(Req) ->
%% @todo We probably want to configure the timeout.
-spec body(Length::non_neg_integer(), Req::#http_req{})
-> {ok, Body::binary(), Req::#http_req{}} | {error, Reason::posix()}.
-body(Length, Req=#http_req{socket=Socket, transport=Transport, body_state=waiting}) ->
+body(Length, Req=#http_req{socket=Socket, transport=Transport,
+ body_state=waiting}) ->
Transport:setopts(Socket, [{packet, raw}]),
case Transport:recv(Socket, Length, 5000) of
{ok, Body} -> {ok, Body, Req#http_req{body_state=done}};