mirror of
https://github.com/servo/servo.git
synced 2025-08-03 20:50:07 +01:00
Fixing one missed trailing whitespace, and fixed url
This commit is contained in:
parent
0362d254b8
commit
8e78564dc3
1 changed files with 2 additions and 2 deletions
|
@ -72,14 +72,14 @@ fn web_socket_scheme_types(scheme: &str) -> SchemeType {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn parse_web_socket_url(url_str: &str) -> Fallible<(Url, String, u16, String, bool)> {
|
fn parse_web_socket_url(url_str: &str) -> Fallible<(Url, String, u16, String, bool)> {
|
||||||
// https://html.spec.whatwg.org/multipage/comms.html#parse-a-websocket-url's-components
|
// https://html.spec.whatwg.org/multipage/#parse-a-websocket-url's-components
|
||||||
// 1. No basepath specified, so it's absolute by default
|
// 1. No basepath specified, so it's absolute by default
|
||||||
// 2. UrlParser defaults to UTF-8 encoding
|
// 2. UrlParser defaults to UTF-8 encoding
|
||||||
// 3. Specifying only ws and wss
|
// 3. Specifying only ws and wss
|
||||||
let parsed_url = UrlParser::new()
|
let parsed_url = UrlParser::new()
|
||||||
.scheme_type_mapper(web_socket_scheme_types)
|
.scheme_type_mapper(web_socket_scheme_types)
|
||||||
.parse(url_str);
|
.parse(url_str);
|
||||||
|
|
||||||
if parsed_url.is_err(){
|
if parsed_url.is_err(){
|
||||||
return Err(Error::Syntax);
|
return Err(Error::Syntax);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue