0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-16 05:00:24 +00:00
cowboy/test
James Fish c8242ab396 Add chunked response body fun
Adds a new type of streaming response fun. It can be set in a similar
way to a streaming body fun with known length:

Req2 = cowboy_req:set_resp_body_fun(chunked, StreamFun, Req)

The fun, StreamFun, should accept a fun as its single argument. This
fun, ChunkFun, is used to send chunks of iodata:

ok = ChunkFun(IoData)

ChunkFun should not be called with an empty binary or iolist as this
will cause HTTP 1.1 clients to believe the stream is over. The final (0
length) chunk will be sent automatically - even if it has already been
sent - assuming no exception is raised.

Also note that the connection will close after the last chunk for HTTP
1.0 clients.
2013-04-26 21:02:10 +01:00
..
autobahn_SUITE_data Update Autobahn test suite to 0.5.3 2013-04-24 21:48:24 +02:00
http_SUITE_data Add chunked response body fun 2013-04-26 21:02:10 +01:00
ws_SUITE_data Reorganize the websocket test suite 2013-04-22 17:03:54 +02:00
autobahn_SUITE.erl Reorganize the websocket test suite 2013-04-22 17:03:54 +02:00
cover.spec Use ct_run instead of rebar ct for running ct tests 2013-01-04 17:56:49 +01:00
eunit_SUITE.erl Fix a small warning in eunit_SUITE 2013-01-05 23:35:13 +01:00
http_SUITE.erl Add chunked response body fun 2013-04-26 21:02:10 +01:00
rest_postonly_resource.erl Add default CTP: "text/html" maps to to_html 2013-04-26 18:34:01 +07:00
ws_SUITE.erl Reorganize the websocket test suite 2013-04-22 17:03:54 +02:00