mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Make the WebSocket handshake ourselves to ease switching libs
We need to switch to tungstenite to finally update openssl, this commit rewrites the whole websocket infrastructure to properly follow the Fetch spec and to make switching to a different websocket library easier.
This commit is contained in:
parent
3ed32f8078
commit
d022535f9c
5 changed files with 561 additions and 71 deletions
|
@ -527,7 +527,7 @@ fn is_null_body_status(status: &Option<StatusCode>) -> bool {
|
|||
}
|
||||
|
||||
/// https://fetch.spec.whatwg.org/#should-response-to-request-be-blocked-due-to-nosniff?
|
||||
fn should_be_blocked_due_to_nosniff(request_type: Type, response_headers: &Headers) -> bool {
|
||||
pub fn should_be_blocked_due_to_nosniff(request_type: Type, response_headers: &Headers) -> bool {
|
||||
/// https://fetch.spec.whatwg.org/#x-content-type-options-header
|
||||
/// This is needed to parse `X-Content-Type-Options` according to spec,
|
||||
/// which requires that we inspect only the first value.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue