Skip to content

Commit b40d2e7

Browse files
committed
Enable transfer encoding
1 parent c3ce117 commit b40d2e7

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,9 @@ fn stream_header(stream: &mut Box<dyn Write + Send + 'static>) {
334334
fn stream_http(stream: &mut Box<dyn Write + Send + 'static>, finish: bool) {
335335
stream.write_all(b"HTTP/1.1 200 OK\r\n").unwrap();
336336
stream.write_all(b"Transfer-Encoding: chunked\r\n").unwrap();
337+
stream
338+
.write_all(b"Content-Type: text/event-stream\r\n")
339+
.unwrap();
337340
stream
338341
.write_all(b"Content-Type: text/plain; charset=utf-8\r\n")
339342
.unwrap();

0 commit comments

Comments
 (0)