From bdf28bb827cd1cc93726e34870964a5af87df175 Mon Sep 17 00:00:00 2001 From: ivmarkov Date: Thu, 1 Feb 2024 16:50:59 +0000 Subject: [PATCH] Fixed a wrong header name which caused WS client socket upgrade to fail --- Cargo.toml | 4 ++-- edge-http/CHANGELOG.md | 3 +++ edge-http/Cargo.toml | 2 +- edge-http/src/lib.rs | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index dac2c6a..e1509e1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "edge-net" -version = "0.7.0" +version = "0.7.1" authors = ["Ivan Markov "] edition = "2021" categories = ["embedded", "hardware-support"] @@ -113,7 +113,7 @@ octseq = { version = "0.3.2", default-features = false } edge-captive = { version = "0.2.0", path = "edge-captive", default-features = false } edge-dhcp = { version = "0.2.0", path = "edge-dhcp", default-features = false } -edge-http = { version = "0.2.0", path = "edge-http", default-features = false } +edge-http = { version = "0.2.1", path = "edge-http", default-features = false } edge-mdns = { version = "0.2.0", path = "edge-mdns", default-features = false } edge-mqtt = { version = "0.2.0", path = "edge-mqtt", default-features = false } edge-raw = { version = "0.2.0", path = "edge-raw", default-features = false } diff --git a/edge-http/CHANGELOG.md b/edge-http/CHANGELOG.md index ef8c4d5..6474d00 100644 --- a/edge-http/CHANGELOG.md +++ b/edge-http/CHANGELOG.md @@ -5,6 +5,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.2.1] - 2024-02-01 +* Fixed a wrong header name which caused WS client socket upgrade to fail + ## [0.2.0] - 2024-02-01 * Remove unnecessary lifetimes when implementing the `embedded-svc` traits * Server: new trait, `TaskHandler` which has an extra `task_id` parameter of type `usize`. This allows the request handling code to take advantage of the fact that - since the number of handlers when running a `Server` instance is fixed - it can store data related to handlers in a simple static array of the same size as the number of handlers that the server is running diff --git a/edge-http/Cargo.toml b/edge-http/Cargo.toml index f075670..a7e9612 100644 --- a/edge-http/Cargo.toml +++ b/edge-http/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "edge-http" -version = "0.2.0" +version = "0.2.1" edition = "2021" rust-version = "1.75" description = "Async + `no_std` + no-alloc implementation of the HTTP protocol" diff --git a/edge-http/src/lib.rs b/edge-http/src/lib.rs index 591c08c..5d510cf 100644 --- a/edge-http/src/lib.rs +++ b/edge-http/src/lib.rs @@ -647,7 +647,7 @@ pub mod ws { connection = value.eq_ignore_ascii_case("Upgrade"); } else if name.eq_ignore_ascii_case("Upgrade") { upgrade = value.eq_ignore_ascii_case("websocket"); - } else if name.eq_ignore_ascii_case("Sec-WebSocket-Key") { + } else if name.eq_ignore_ascii_case("Sec-WebSocket-Accept") { let sec_key = sec_key_encode(nonce, buf); let mut sha1 = sha1_smol::Sha1::new();