diff options
author | Patrick Shaughnessy <pshaughn@comcast.net> | 2020-01-28 12:47:18 -0500 |
---|---|---|
committer | Patrick Shaughnessy <pshaughn@comcast.net> | 2020-01-28 12:47:18 -0500 |
commit | fc13bd8b2f8f7b06aea928e3e5ab56a4b3a2584a (patch) | |
tree | 45085cb894b6832d89caa6956103fe88027121b8 /components/net/websocket_loader.rs | |
parent | 2b3c4eba2dc90901d09d9b3cd16a69f79188b069 (diff) | |
download | servo-fc13bd8b2f8f7b06aea928e3e5ab56a4b3a2584a.tar.gz servo-fc13bd8b2f8f7b06aea928e3e5ab56a4b3a2584a.zip |
Cookie header values can be utf8
Diffstat (limited to 'components/net/websocket_loader.rs')
-rw-r--r-- | components/net/websocket_loader.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/components/net/websocket_loader.rs b/components/net/websocket_loader.rs index 93bb031dca8..fb24e6566a4 100644 --- a/components/net/websocket_loader.rs +++ b/components/net/websocket_loader.rs @@ -92,7 +92,7 @@ impl<'a> Handler for Client<'a> { let mut jar = self.http_state.cookie_jar.write().unwrap(); // TODO(eijebong): Replace thise once typed headers settled on a cookie impl for cookie in headers.get_all(header::SET_COOKIE) { - if let Ok(s) = cookie.to_str() { + if let Ok(s) = std::str::from_utf8(cookie.as_bytes()) { if let Some(cookie) = Cookie::from_cookie_string(s.into(), self.resource_url, CookieSource::HTTP) { |