diff options
author | Loïc Hoguin <[email protected]> | 2011-12-05 07:54:56 +0100 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2011-12-05 07:54:56 +0100 |
commit | 99d8f837fe4af42edfdba1e83659f1ca8d75d17d (patch) | |
tree | 40568222c46cbed14feefb6f3d9c6d81a6f00030 /src/cowboy_http_req.erl | |
parent | 83ec63374f55e8cd407ba2cd6fc264acaa045422 (diff) | |
download | cowboy-99d8f837fe4af42edfdba1e83659f1ca8d75d17d.tar.gz cowboy-99d8f837fe4af42edfdba1e83659f1ca8d75d17d.tar.bz2 cowboy-99d8f837fe4af42edfdba1e83659f1ca8d75d17d.zip |
Fix specs to allow headers as iodata() and not just binary()
Diffstat (limited to 'src/cowboy_http_req.erl')
-rw-r--r-- | src/cowboy_http_req.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl index f457d4f..66c8853 100644 --- a/src/cowboy_http_req.erl +++ b/src/cowboy_http_req.erl @@ -363,7 +363,7 @@ body_qs(Req) -> %% Response API. %% @doc Add a header to the response. --spec set_resp_header(http_header(), binary(), #http_req{}) +-spec set_resp_header(http_header(), iodata(), #http_req{}) -> {ok, #http_req{}}. set_resp_header(Name, Value, Req=#http_req{resp_headers=RespHeaders}) -> NameBin = header_to_binary(Name), @@ -373,7 +373,7 @@ set_resp_header(Name, Value, Req=#http_req{resp_headers=RespHeaders}) -> %% %% The body set here is ignored if the response is later sent using %% anything other than reply/2 or reply/3. --spec set_resp_body(binary(), #http_req{}) -> {ok, #http_req{}}. +-spec set_resp_body(iodata(), #http_req{}) -> {ok, #http_req{}}. set_resp_body(Body, Req) -> {ok, Req#http_req{resp_body=Body}}. |