mirror of
https://github.com/servo/servo.git
synced 2025-08-05 05:30:08 +01:00
auto merge of #5312 : frewsxcv/servo/cleanup-view-source, r=jdm
Fixes #5304
This commit is contained in:
commit
0c3615ced1
1 changed files with 3 additions and 5 deletions
|
@ -64,7 +64,8 @@ fn load(mut load_data: LoadData, start_chan: Sender<TargetedLoadResponse>, cooki
|
||||||
// real URL that should be used for which the source is to be viewed.
|
// real URL that should be used for which the source is to be viewed.
|
||||||
// Change our existing URL to that and keep note that we are viewing
|
// Change our existing URL to that and keep note that we are viewing
|
||||||
// the source rather than rendering the contents of the URL.
|
// the source rather than rendering the contents of the URL.
|
||||||
let viewing_source = if &*url.scheme == "view-source" {
|
let viewing_source = url.scheme == "view-source";
|
||||||
|
if viewing_source {
|
||||||
let inner_url = load_data.url.non_relative_scheme_data().unwrap();
|
let inner_url = load_data.url.non_relative_scheme_data().unwrap();
|
||||||
url = Url::parse(inner_url).unwrap();
|
url = Url::parse(inner_url).unwrap();
|
||||||
match &*url.scheme {
|
match &*url.scheme {
|
||||||
|
@ -75,10 +76,7 @@ fn load(mut load_data: LoadData, start_chan: Sender<TargetedLoadResponse>, cooki
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
true
|
}
|
||||||
} else {
|
|
||||||
false
|
|
||||||
};
|
|
||||||
|
|
||||||
// Loop to handle redirects.
|
// Loop to handle redirects.
|
||||||
loop {
|
loop {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue