mirror of
https://github.com/servo/servo.git
synced 2025-06-20 23:28:59 +01: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
|
@ -43,6 +43,7 @@ pub fn spawn_css_parser(provenance: StylesheetProvenance,
|
|||
fn data_stream(provenance: StylesheetProvenance, resource_task: ResourceTask) -> DataStream {
|
||||
match provenance {
|
||||
UrlProvenance(url) => {
|
||||
debug!("cssparse: loading style sheet at %s", url.to_str());
|
||||
let (input_port, input_chan) = comm::stream();
|
||||
resource_task.send(Load(url, input_chan));
|
||||
resource_port_to_data_stream(input_port)
|
||||
|
|
|
@ -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