mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -05:00
fix bug in SSE
This commit is contained in:
parent
cafa2a5420
commit
fb1b1f9975
1 changed files with 1 additions and 1 deletions
|
|
@ -981,7 +981,7 @@ let add_route_server_sent_handler ?accept self route f =
|
|||
|
||||
let send_event ?event ?id ?retry ~data () : unit =
|
||||
send_response_idempotent_();
|
||||
_opt_iter event ~f:(fun e -> Printf.fprintf oc "data: %s\n" e);
|
||||
_opt_iter event ~f:(fun e -> Printf.fprintf oc "event: %s\n" e);
|
||||
_opt_iter id ~f:(fun e -> Printf.fprintf oc "id: %s\n" e);
|
||||
_opt_iter retry ~f:(fun e -> Printf.fprintf oc "retry: %s\n" e);
|
||||
let l = String.split_on_char '\n' data in
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue