mirror of
https://github.com/tokio-rs/axum.git
synced 2026-08-26 00:00:23 +02:00
Don't remove the Sec-WebSocket-Key header in WebSocketUpgrade (#1972)
This commit is contained in:
+3
-1
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
# Unreleased
|
||||
|
||||
- None.
|
||||
- **fixed:** Don't remove the `Sec-WebSocket-Key` header in `WebSocketUpgrade` ([#1972])
|
||||
|
||||
[#1972]: https://github.com/tokio-rs/axum/pull/1972
|
||||
|
||||
# 0.6.17 (25. April, 2023)
|
||||
|
||||
|
||||
@@ -391,8 +391,9 @@ where
|
||||
|
||||
let sec_websocket_key = parts
|
||||
.headers
|
||||
.remove(header::SEC_WEBSOCKET_KEY)
|
||||
.ok_or(WebSocketKeyHeaderMissing)?;
|
||||
.get(header::SEC_WEBSOCKET_KEY)
|
||||
.ok_or(WebSocketKeyHeaderMissing)?
|
||||
.clone();
|
||||
|
||||
let on_upgrade = parts
|
||||
.extensions
|
||||
|
||||
Reference in New Issue
Block a user