Skip to content

Commit

Permalink
Merge pull request #3 from crowlKats/patch-2
Browse files Browse the repository at this point in the history
  • Loading branch information
crowlKats committed Oct 26, 2021
2 parents d1e716c + 16e4876 commit c5ad0c9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/http/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,9 @@ fn is_websocket_request(req: &hyper::Request<hyper::Body>) -> bool {
&& req.method() == hyper::Method::GET
&& req.headers().contains_key(&SEC_WEBSOCKET_KEY)
&& header(req.headers(), &SEC_WEBSOCKET_VERSION) == b"13"
&& header(req.headers(), &UPGRADE).eq_ignore_ascii_case(b"websocket")
&& header(req.headers(), &UPGRADE)
.split(|c| *c == b' ' || *c == b',')
.any(|token| token.eq_ignore_ascii_case(b"websocket"))
&& header(req.headers(), &CONNECTION)
.split(|c| *c == b' ' || *c == b',')
.any(|token| token.eq_ignore_ascii_case(b"upgrade"))
Expand Down

0 comments on commit c5ad0c9

Please sign in to comment.