aboutsummaryrefslogtreecommitdiffstats
path: root/test/handlers/sse_clock_h.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/handlers/sse_clock_h.erl')
-rw-r--r--test/handlers/sse_clock_h.erl7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/handlers/sse_clock_h.erl b/test/handlers/sse_clock_h.erl
index 8c18ac5..dcc7c3f 100644
--- a/test/handlers/sse_clock_h.erl
+++ b/test/handlers/sse_clock_h.erl
@@ -15,6 +15,11 @@ init(Req, State) ->
info(timeout, Req, State) ->
erlang:send_after(1000, self(), timeout),
cowboy_req:stream_events(#{
- data => cowboy_clock:rfc1123()
+ data => data(State)
}, nofin, Req),
{ok, Req, State}.
+
+data(date) ->
+ cowboy_clock:rfc1123();
+data(Size) when is_integer(Size) ->
+ lists:duplicate(Size, $0).