зеркало из https://github.com/mozilla/gecko-dev.git
servo: Update rust-http-client
Source-Repo: https://github.com/servo/servo Source-Revision: 25a5e903a77a9a0fb553e1d352ca9ee2df07d35d
This commit is contained in:
Родитель
c20bb6393e
Коммит
df20ee2d87
|
@ -4,10 +4,7 @@ import comm::{chan, methods};
|
|||
import task::spawn;
|
||||
import resource_task::{ProgressMsg, Payload, Done};
|
||||
import std::net::url::url;
|
||||
import http_client::{
|
||||
uv_http_request,
|
||||
Uri
|
||||
};
|
||||
import http_client::{uv_http_request};
|
||||
import result::{ok, err};
|
||||
|
||||
fn factory(url: url, progress_chan: chan<ProgressMsg>) {
|
||||
|
@ -15,7 +12,7 @@ fn factory(url: url, progress_chan: chan<ProgressMsg>) {
|
|||
|
||||
do spawn {
|
||||
#debug("http_loader: requesting via http: %?", url);
|
||||
let request = uv_http_request(url_to_http_client_uri(url));
|
||||
let request = uv_http_request(url);
|
||||
let errored = @mut false;
|
||||
do request.begin |event| {
|
||||
alt event {
|
||||
|
@ -39,10 +36,3 @@ fn factory(url: url, progress_chan: chan<ProgressMsg>) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn url_to_http_client_uri(url: url) -> Uri {
|
||||
{
|
||||
host: url.host,
|
||||
path: url.path
|
||||
}
|
||||
}
|
Загрузка…
Ссылка в новой задаче