aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/websocket_loader.rs
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2016-04-23 11:28:31 -0700
committerbors-servo <lbergstrom+bors@mozilla.com>2016-04-23 11:28:31 -0700
commit84ab7e9fe8f4a6528995eff3eb6e814cb724c364 (patch)
treec147ef89425697fd545a7a86518e2f37abd102a5 /components/net/websocket_loader.rs
parent305c283602882850be9d39c43b980d0fc0f93a3c (diff)
parente66260513834e4ffafcd1539649432068c0ecc70 (diff)
downloadservo-84ab7e9fe8f4a6528995eff3eb6e814cb724c364.tar.gz
servo-84ab7e9fe8f4a6528995eff3eb6e814cb724c364.zip
Auto merge of #9840 - servo:url-1.0, r=asajeffrey
Update to rust-url 1.0 **Do not merge yet:** rust-url 1.0 is not published yet and may still get breaking changes. The goal of this PR for now is to demonstrate API usage. Depends on: * <s>https://github.com/servo/rust-url/pull/176</s> * <s>https://github.com/alexcrichton/cookie-rs/pull/42</s> * <s>https://github.com/hyperium/hyper/pull/740</s> * https://github.com/cyderize/rust-websocket/pull/70 * https://github.com/jgraham/webdriver-rust/pull/28 <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9840) <!-- Reviewable:end -->
Diffstat (limited to 'components/net/websocket_loader.rs')
-rw-r--r--components/net/websocket_loader.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/components/net/websocket_loader.rs b/components/net/websocket_loader.rs
index 64408d3e9cf..24f68f12684 100644
--- a/components/net/websocket_loader.rs
+++ b/components/net/websocket_loader.rs
@@ -32,8 +32,8 @@ fn establish_a_websocket_connection(resource_url: &Url, net_url: (Host, String,
-> WebSocketResult<(Headers, Sender<WebSocketStream>, Receiver<WebSocketStream>)> {
let host = Host {
- hostname: resource_url.serialize_host().unwrap(),
- port: resource_url.port_or_default()
+ hostname: resource_url.host_str().unwrap().to_owned(),
+ port: resource_url.port_or_known_default(),
};
let mut request = try!(Client::connect(net_url));