diff --git a/src/components/net/http_loader.rs b/src/components/net/http_loader.rs index 3d836308685..88ca509827a 100644 --- a/src/components/net/http_loader.rs +++ b/src/components/net/http_loader.rs @@ -11,7 +11,6 @@ use http::client::RequestWriter; use http::method::Get; use http::headers::HeaderEnum; use std::rt::io::Reader; -use std::rt::io::net::ip::SocketAddr; pub fn factory() -> LoaderTask { let f: LoaderTask = |url, progress_chan| { @@ -27,8 +26,7 @@ fn load(url: Url, progress_chan: Chan) { info!("requesting %s", url.to_str()); - let mut request = ~RequestWriter::new(Get, url.clone()); - request.remote_addr = Some(url_to_socket_addr(&url)); + let request = ~RequestWriter::new(Get, url.clone()); let mut response = match request.read_response() { Ok(r) => r, Err(_) => { @@ -57,9 +55,3 @@ fn load(url: Url, progress_chan: Chan) { progress_chan.send(Payload(buf)); } } - -// FIXME: Quick hack to convert ip addresses to SocketAddr -fn url_to_socket_addr(url: &Url) -> SocketAddr { - let host_and_port = fmt!("%s:%s", url.host, url.port.clone().unwrap_or_default(~"80")); - FromStr::from_str(host_and_port).expect("couldn't parse host as IP address") -} diff --git a/src/support/http/rust-http b/src/support/http/rust-http index a391c127b00..3359d736506 160000 --- a/src/support/http/rust-http +++ b/src/support/http/rust-http @@ -1 +1 @@ -Subproject commit a391c127b00128b81127621720d2e361c8d9070e +Subproject commit 3359d73650614921718b84d6c680cd7898b35df7