Browse Source

Add missing clause to cowboy_req:has_resp_body/1

Loïc Hoguin 12 years ago
parent
commit
9d7f909923
1 changed files with 2 additions and 0 deletions
  1. 2 0
      src/cowboy_req.erl

+ 2 - 0
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.
 %% @doc Return whether a body has been set for the response.
 -spec has_resp_body(req()) -> boolean().
 -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, _}}) ->
 has_resp_body(#http_req{resp_body={Length, _}}) ->
 	Length > 0;
 	Length > 0;
 has_resp_body(#http_req{resp_body=RespBody}) ->
 has_resp_body(#http_req{resp_body=RespBody}) ->