aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2013-01-20 00:58:50 +0100
committerLoïc Hoguin <[email protected]>2013-01-20 00:58:50 +0100
commit9d7f909923c9e7e503df2da804811b89f6a7056c (patch)
treea08f2bc115b1591b084e179c335ad8d8d40ac474 /src
parent42e3468fecae9844f95d6c4a36d6aab772da7698 (diff)
downloadcowboy-9d7f909923c9e7e503df2da804811b89f6a7056c.tar.gz
cowboy-9d7f909923c9e7e503df2da804811b89f6a7056c.tar.bz2
cowboy-9d7f909923c9e7e503df2da804811b89f6a7056c.zip
Add missing clause to cowboy_req:has_resp_body/1
Diffstat (limited to 'src')
-rw-r--r--src/cowboy_req.erl2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl
index bf897a3..849831d 100644
--- a/src/cowboy_req.erl
+++ b/src/cowboy_req.erl
@@ -865,6 +865,8 @@ has_resp_header(Name, #http_req{resp_headers=RespHeaders}) ->
%% @doc Return whether a body has been set for the response.
-spec has_resp_body(req()) -> boolean().
+has_resp_body(#http_req{resp_body=RespBody}) when is_function(RespBody) ->
+ true;
has_resp_body(#http_req{resp_body={Length, _}}) ->
Length > 0;
has_resp_body(#http_req{resp_body=RespBody}) ->