Skip to content

Commit

Permalink
Fixing one missed trailing whitespace, and fixed url
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldfaria committed May 20, 2015
1 parent 0362d25 commit 8e78564
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions components/script/dom/websocket.rs
Expand Up @@ -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)> {
// 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
// 2. UrlParser defaults to UTF-8 encoding
// 3. Specifying only ws and wss
let parsed_url = UrlParser::new()
.scheme_type_mapper(web_socket_scheme_types)
.parse(url_str);

if parsed_url.is_err(){
return Err(Error::Syntax);
}
Expand Down

0 comments on commit 8e78564

Please sign in to comment.