aboutsummaryrefslogtreecommitdiffstats
path: root/src/cowboy_http_req.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2011-04-18 13:32:35 +0200
committerLoïc Hoguin <[email protected]>2011-04-18 13:32:35 +0200
commit731d839323e74b95a326001e4e424a1f2b18902e (patch)
tree651bd6c94a3448ca46371d38b3899c88fcbb78b4 /src/cowboy_http_req.erl
parentdb7833f5e8f407ad6f61eadc970966c35d030ead (diff)
downloadcowboy-731d839323e74b95a326001e4e424a1f2b18902e.tar.gz
cowboy-731d839323e74b95a326001e4e424a1f2b18902e.tar.bz2
cowboy-731d839323e74b95a326001e4e424a1f2b18902e.zip
Replace posix() by atom(), for now.
The type isn't exported by OTP so we don't win much. Also, inet.erl and file.erl define posix() différently, so OTP needs to stop being so confuse in the first place before we can attempt to use it properly.
Diffstat (limited to 'src/cowboy_http_req.erl')
-rw-r--r--src/cowboy_http_req.erl4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl
index f8b54e4..932ba3e 100644
--- a/src/cowboy_http_req.erl
+++ b/src/cowboy_http_req.erl
@@ -145,7 +145,7 @@ headers(Req) ->
%% @todo We probably want to allow a max length.
-spec body(Req::#http_req{})
- -> {ok, Body::binary(), Req::#http_req{}} | {error, Reason::posix()}.
+ -> {ok, Body::binary(), Req::#http_req{}} | {error, Reason::atom()}.
body(Req) ->
{Length, Req2} = cowboy_http_req:header('Content-Length', Req),
case Length of
@@ -157,7 +157,7 @@ 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()}.
+ -> {ok, Body::binary(), Req::#http_req{}} | {error, Reason::atom()}.
body(Length, Req=#http_req{socket=Socket, transport=Transport,
body_state=waiting}) ->
Transport:setopts(Socket, [{packet, raw}]),