denoland / fastwebsockets

A fast RFC6455 WebSocket implementation
https://docs.rs/fastwebsockets/
Apache License 2.0
880 stars 66 forks source link

Error: Invalid status code on examples/tls_client.ts #49

Closed thaibui closed 1 year ago

thaibui commented 1 year ago

I've been getting an error "Invalid status code" when I tried to use a tls stream to connect to a websocket endpoint. So I went to run the examples/tls_client.ts directly from this repo and I still am getting the same error. I'm not sure why.

My environment:

uname -a
Darwin MP14.local 22.4.0 Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000 arm64
cargo -V
cargo 1.71.0-nightly (569b648b5 2023-05-05)
pwd
/fastwebsockets
git rev-parse HEAD
0d6f5bd86c94f6ceb8a9410eaa39fac8d7341d99

Cargo run

cargo run --color=always --package fastwebsockets --example tls_client --features=upgrade

    Finished dev [unoptimized + debuginfo] target(s) in 0.06s
     Running `target/debug/examples/tls_client`
Error: Invalid status code