Merge pull request #119 from kids300/master

Fix ws request subportocol lowercase header
pull/132/head
Daniel Abramov 5 years ago committed by GitHub
commit 6791dcc0d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      src/handshake/client.rs

@ -135,7 +135,12 @@ fn generate_request(request: Request, key: &str) -> Result<Vec<u8>> {
key = key
)
.unwrap();
for (k, v) in request.headers() {
let mut k = k.as_str();
if k == "sec-websocket-protocol" {
k = "Sec-WebSocket-Protocol";
}
writeln!(req, "{}: {}\r", k, v.to_str()?).unwrap();
}
writeln!(req, "\r").unwrap();

Loading…
Cancel
Save