diff options
author | Loïc Hoguin <[email protected]> | 2014-06-10 09:31:11 +0200 |
---|---|---|
committer | Loïc Hoguin <[email protected]> | 2014-06-10 09:31:11 +0200 |
commit | 02e0db4b43aa9dd6cb22a83b78b1d2efb8e66f7b (patch) | |
tree | 050b0ff27e547fc8b676589c4967d148ef40e225 /src | |
parent | 3ffadd8f45370499fbfa5ff994675447c51e3912 (diff) | |
download | cowlib-02e0db4b43aa9dd6cb22a83b78b1d2efb8e66f7b.tar.gz cowlib-02e0db4b43aa9dd6cb22a83b78b1d2efb8e66f7b.tar.bz2 cowlib-02e0db4b43aa9dd6cb22a83b78b1d2efb8e66f7b.zip |
Fix chunked transfer decoding tests
Diffstat (limited to 'src')
-rw-r--r-- | src/cow_http_te.erl | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cow_http_te.erl b/src/cow_http_te.erl index 5c23fad..7bd6880 100644 --- a/src/cow_http_te.erl +++ b/src/cow_http_te.erl @@ -249,14 +249,14 @@ stream_chunked_n_passes_test() -> more = stream_chunked(<<"4\r">>, S0), {more, <<>>, 6, S1} = stream_chunked(<<"4\r\n">>, S0), {more, <<"Wiki">>, 0, S2} = stream_chunked(<<"Wiki\r\n">>, S1), - {more, <<"pedia">>, 0, <<"e\r">>, S3} = stream_chunked(<<"5\r\npedia\r\ne\r">>, S2), + {more, <<"pedia">>, <<"e\r">>, S3} = stream_chunked(<<"5\r\npedia\r\ne\r">>, S2), {more, <<" in\r\n\r\nchunks.">>, 2, S4} = stream_chunked(<<"e\r\n in\r\n\r\nchunks.">>, S3), {done, 23, <<>>} = stream_chunked(<<"\r\n0\r\n\r\n">>, S4), %% A few extra for coverage purposes. more = stream_chunked(<<"\n3">>, {1, 0}), {more, <<"abc">>, 2, {2, 3}} = stream_chunked(<<"\n3\r\nabc">>, {1, 0}), {more, <<"abc">>, {1, 3}} = stream_chunked(<<"3\r\nabc\r">>, {0, 0}), - {more, <<"abc">>, 0, <<"123">>, {0, 3}} = stream_chunked(<<"3\r\nabc\r\n123">>, {0, 0}), + {more, <<"abc">>, <<"123">>, {0, 3}} = stream_chunked(<<"3\r\nabc\r\n123">>, {0, 0}), ok. stream_chunked_dripfeed_test() -> |