aboutsummaryrefslogtreecommitdiffstats
path: root/components/net_traits/lib.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/net_traits/lib.rs')
-rw-r--r--components/net_traits/lib.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/components/net_traits/lib.rs b/components/net_traits/lib.rs
index 36fc77edacc..768996b6748 100644
--- a/components/net_traits/lib.rs
+++ b/components/net_traits/lib.rs
@@ -348,9 +348,9 @@ pub enum WebSocketDomAction {
#[derive(Deserialize, Serialize)]
pub enum WebSocketNetworkEvent {
- ConnectionEstablished(#[serde(deserialize_with = "::hyper_serde::deserialize",
- serialize_with = "::hyper_serde::serialize")]
- header::Headers),
+ ConnectionEstablished {
+ protocol_in_use: Option<String>,
+ },
MessageReceived(MessageData),
Close(Option<u16>, String),
Fail,
@@ -514,11 +514,6 @@ pub fn load_whole_resource(request: RequestInit,
}
}
-/// Defensively unwraps the protocol string from the response object's protocol
-pub fn unwrap_websocket_protocol(wsp: Option<&header::WebSocketProtocol>) -> Option<&str> {
- wsp.and_then(|protocol_list| protocol_list.get(0).map(|protocol| protocol.as_ref()))
-}
-
/// An unique identifier to keep track of each load message in the resource handler
#[derive(Clone, PartialEq, Eq, Copy, Hash, Debug, Deserialize, Serialize, HeapSizeOf)]
pub struct ResourceId(pub u32);