Skip to content

Commit 2e0b561

Browse files
committed
update http-types
Signed-off-by: Marc-Antoine Perennou <[email protected]>
1 parent 14500db commit 2e0b561

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ authors = [
1818

1919
[dependencies]
2020
async-std = { version = "1.5.0", features = ["unstable"] }
21-
http-types = "1.0.1"
21+
http-types = "2.0.0"
2222
log = "0.4.8"
2323
memchr = "2.3.3"
2424
pin-project-lite = "0.1.4"

src/handshake.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
/// Upgrade an HTTP connection into an SSE session.
2-
pub fn upgrade(headers: &mut impl AsMut<http_types::Headers>) -> http_types::Result<()> {
2+
pub fn upgrade(headers: &mut impl AsMut<http_types::Headers>) {
33
let headers = headers.as_mut();
4-
headers.insert("Cache-Control", "no-cache")?;
5-
headers.insert("Content-Type", "text/event-stream")?;
6-
Ok(())
4+
headers.insert("Cache-Control", "no-cache");
5+
headers.insert("Content-Type", "text/event-stream");
76
}

0 commit comments

Comments
 (0)