0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00

Update cowlib to 0.6.1

This commit is contained in:
Loïc Hoguin 2014-03-27 11:39:09 +01:00
parent c9b9644aa3
commit 0502452967
3 changed files with 6 additions and 10 deletions

View file

@ -13,7 +13,7 @@ PLT_APPS = crypto public_key ssl
# Dependencies. # Dependencies.
DEPS = cowlib ranch DEPS = cowlib ranch
dep_cowlib = pkg://cowlib 0.6.0 dep_cowlib = pkg://cowlib 0.6.1
dep_ranch = pkg://ranch 0.9.0 dep_ranch = pkg://ranch 0.9.0
TEST_DEPS = ct_helper gun TEST_DEPS = ct_helper gun

View file

@ -1,4 +1,4 @@
{deps, [ {deps, [
{cowlib, ".*", {git, "git://github.com/extend/cowlib.git", "0.6.0"}}, {cowlib, ".*", {git, "git://github.com/extend/cowlib.git", "0.6.1"}},
{ranch, ".*", {git, "git://github.com/extend/ranch.git", "0.9.0"}} {ranch, ".*", {git, "git://github.com/extend/ranch.git", "0.9.0"}}
]}. ]}.

View file

@ -100,11 +100,7 @@
-> {ok, binary()} -> {ok, binary()}
| {error, atom()}). | {error, atom()}).
-type transfer_decode_fun() :: fun((binary(), any()) -type transfer_decode_fun() :: fun((binary(), any())
-> {ok, binary(), binary(), any()} -> cow_http_te:decode_ret()).
| more | {more, non_neg_integer(), binary(), any()}
| {done, non_neg_integer(), binary()}
| {done, binary(), non_neg_integer(), binary()}
| {error, atom()}).
-type resp_body_fun() :: fun((any(), module()) -> ok). -type resp_body_fun() :: fun((any(), module()) -> ok).
-type send_chunk_fun() :: fun((iodata()) -> ok | {error, atom()}). -type send_chunk_fun() :: fun((iodata()) -> ok | {error, atom()}).
@ -571,13 +567,13 @@ transfer_decode(Data, Req=#http_req{body_state={stream, _,
content_decode(ContentDecode, Data2, content_decode(ContentDecode, Data2,
Req#http_req{body_state={stream, 0, Req#http_req{body_state={stream, 0,
TransferDecode, TransferState2, ContentDecode}}); TransferDecode, TransferState2, ContentDecode}});
{more, Data2, Length, TransferState2} -> {more, Data2, Length, TransferState2} when is_integer(Length) ->
content_decode(ContentDecode, Data2, content_decode(ContentDecode, Data2,
Req#http_req{body_state={stream, Length, Req#http_req{body_state={stream, Length,
TransferDecode, TransferState2, ContentDecode}}); TransferDecode, TransferState2, ContentDecode}});
{more, Data2, Length, Rest, TransferState2} -> {more, Data2, Rest, TransferState2} ->
content_decode(ContentDecode, Data2, content_decode(ContentDecode, Data2,
Req#http_req{buffer=Rest, body_state={stream, Length, Req#http_req{buffer=Rest, body_state={stream, 0,
TransferDecode, TransferState2, ContentDecode}}); TransferDecode, TransferState2, ContentDecode}});
{done, Length, Rest} -> {done, Length, Rest} ->
Req2 = transfer_decode_done(Length, Rest, Req), Req2 = transfer_decode_done(Length, Rest, Req),