mirror of
https://github.com/servo/servo.git
synced 2025-06-17 04:44:28 +00:00
Resolve relative URLs that begin with '//'
This commit is contained in:
parent
a9ed2d809d
commit
e50cee9adc
3 changed files with 7 additions and 2 deletions
|
@ -129,11 +129,13 @@ fn js_script_listener(to_parent: Chan<~[~[u8]]>,
|
|||
buf += data;
|
||||
}
|
||||
Done(Ok(*)) => {
|
||||
result_chan.send(buf);
|
||||
result_chan.send(Some(buf));
|
||||
break;
|
||||
}
|
||||
Done(Err(*)) => {
|
||||
error!("error loading script %s", url.to_str());
|
||||
result_chan.send(None);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +148,7 @@ fn js_script_listener(to_parent: Chan<~[~[u8]]>,
|
|||
}
|
||||
}
|
||||
|
||||
let js_scripts = vec::map(result_vec, |result_port| result_port.recv());
|
||||
let js_scripts = vec::filter_map(result_vec, |result_port| result_port.recv());
|
||||
to_parent.send(js_scripts);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue