Skip to content

Commit 80cd4f1

Browse files
committed
use tide::Response interface in the sse endpoint
instead of dropping down to the http-types equivalents
1 parent 26c6cdf commit 80cd4f1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/sse/endpoint.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ where
5858
// Perform the handshake as described here:
5959
// https://html.spec.whatwg.org/multipage/server-sent-events.html#sse-processing-model
6060
let mut res = Response::new(StatusCode::Ok);
61-
res.res.insert_header("Cache-Control", "no-cache").unwrap();
62-
res.res.set_content_type(mime::SSE);
61+
res.insert_header("Cache-Control", "no-cache");
62+
res.set_content_type(mime::SSE);
6363

6464
let body = Body::from_reader(BufReader::new(encoder), None);
6565
res.set_body(body);

0 commit comments

Comments
 (0)