From bd90df1f5e641b2a8e35563e65851b257279bfa4 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Sat, 29 Oct 2011 15:48:43 +0100 Subject: Fix cowboy_http_req:chunk/2 spec --- src/cowboy_http_req.erl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cowboy_http_req.erl') diff --git a/src/cowboy_http_req.erl b/src/cowboy_http_req.erl index 6c4aade..3a3dd2f 100644 --- a/src/cowboy_http_req.erl +++ b/src/cowboy_http_req.erl @@ -383,7 +383,7 @@ chunked_reply(Status, Headers, Req=#http_req{socket=Socket, transport=Transport, %% @doc Send a chunk of data. %% %% A chunked reply must have been initiated before calling this function. --spec chunk(iodata(), #http_req{}) -> ok. +-spec chunk(iodata(), #http_req{}) -> ok | {error, atom()}. chunk(_Data, #http_req{socket=_Socket, transport=_Transport, method='HEAD'}) -> ok; chunk(Data, #http_req{socket=Socket, transport=Transport, resp_state=chunks}) -> -- cgit v1.2.3