mirror of
https://github.com/servo/servo.git
synced 2025-08-06 14:10:11 +01:00
Update rust-http-client
This commit is contained in:
parent
114a2689e0
commit
25a5e903a7
2 changed files with 3 additions and 13 deletions
|
@ -1 +1 @@
|
|||
Subproject commit 0fe29122c25f5fd8b00270dc96821df774d43745
|
||||
Subproject commit d8fea132cd638cecace5734a333f56bca144d03a
|
|
@ -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
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue