Browse Source

Fix cow_http_te:decode_ret() type

Loïc Hoguin 5 years ago
parent
commit
a551f8b71b
1 changed files with 3 additions and 2 deletions
  1. 3 2
      src/cow_http_te.erl

+ 3 - 2
src/cow_http_te.erl

@@ -25,13 +25,14 @@
 
 
 %% The state type is the same for both identity and chunked.
 %% The state type is the same for both identity and chunked.
 -type state() :: {non_neg_integer(), non_neg_integer()}.
 -type state() :: {non_neg_integer(), non_neg_integer()}.
+-export_type([state/0]).
 
 
 -type decode_ret() :: more
 -type decode_ret() :: more
 	| {more, Data::binary(), state()}
 	| {more, Data::binary(), state()}
 	| {more, Data::binary(), RemLen::non_neg_integer(), state()}
 	| {more, Data::binary(), RemLen::non_neg_integer(), state()}
 	| {more, Data::binary(), Rest::binary(), state()}
 	| {more, Data::binary(), Rest::binary(), state()}
-	| {done, TotalLen::non_neg_integer(), Rest::binary()}
-	| {done, Data::binary(), TotalLen::non_neg_integer(), Rest::binary()}.
+	| {done, HasTrailers::trailers | no_trailers, Rest::binary()}
+	| {done, Data::binary(), HasTrailers::trailers | no_trailers, Rest::binary()}.
 -export_type([decode_ret/0]).
 -export_type([decode_ret/0]).
 
 
 -include("cow_parse.hrl").
 -include("cow_parse.hrl").