diff options
author | Loïc Hoguin <[email protected]> | 2013-04-11 14:22:16 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2013-04-11 22:25:31 +0200 |
commit | bd9c3df6d0225d26ea3c03eef01f4884c4db8dab (patch) | |
tree | 4f934eaec66baa042dcbc7341b29c5e1d8f183a0 | |
parent | 53a48b254fae99a189bc751d853b77f415a49443 (diff) | |
download | cowboy-bd9c3df6d0225d26ea3c03eef01f4884c4db8dab.tar.gz cowboy-bd9c3df6d0225d26ea3c03eef01f4884c4db8dab.tar.bz2 cowboy-bd9c3df6d0225d26ea3c03eef01f4884c4db8dab.zip |
No need for fully qualified call to the same module
-rw-r--r-- | src/cowboy_req.erl | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/cowboy_req.erl b/src/cowboy_req.erl index 856ce21..abe33f4 100644 --- a/src/cowboy_req.erl +++ b/src/cowboy_req.erl @@ -566,7 +566,7 @@ set_meta(Name, Value, Req=#http_req{meta=Meta}) -> %% Request Body API. %% @doc Return whether the request message has a body. --spec has_body(cowboy_req:req()) -> boolean(). +-spec has_body(req()) -> boolean(). has_body(Req) -> case lists:keyfind(<<"content-length">>, 1, Req#http_req.headers) of {_, <<"0">>} -> @@ -1013,8 +1013,7 @@ reply(Status, Headers, Body, Req=#http_req{ reply_may_compress(Status, Headers, Body, Req, RespHeaders, HTTP11Headers, Method) -> BodySize = iolist_size(Body), - {ok, Encodings, Req2} - = cowboy_req:parse_header(<<"accept-encoding">>, Req), + {ok, Encodings, Req2} = parse_header(<<"accept-encoding">>, Req), CanGzip = (BodySize > 300) andalso (false =:= lists:keyfind(<<"content-encoding">>, 1, Headers)) |