diff options
author | bors-servo <metajack+bors@gmail.com> | 2015-03-23 15:42:48 -0600 |
---|---|---|
committer | bors-servo <metajack+bors@gmail.com> | 2015-03-23 15:42:48 -0600 |
commit | 0c3615ced1c4b648e63ad8c33ea0885c45ce3fb1 (patch) | |
tree | 61bbf182b4669c7f8004599cee9adafc0c3d3e3c | |
parent | f62ab247fcb9e5fb7025dfdaa83f4ebd4084eab1 (diff) | |
parent | 2da17b3ce546cec9bea40c3ebfdb6ded3c1e78ef (diff) | |
download | servo-0c3615ced1c4b648e63ad8c33ea0885c45ce3fb1.tar.gz servo-0c3615ced1c4b648e63ad8c33ea0885c45ce3fb1.zip |
auto merge of #5312 : frewsxcv/servo/cleanup-view-source, r=jdm
Fixes #5304
-rw-r--r-- | components/net/http_loader.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs index e1f0c1c69f3..6bc5e990096 100644 --- a/components/net/http_loader.rs +++ b/components/net/http_loader.rs @@ -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. // Change our existing URL to that and keep note that we are viewing // 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(); url = Url::parse(inner_url).unwrap(); match &*url.scheme { @@ -75,10 +76,7 @@ fn load(mut load_data: LoadData, start_chan: Sender<TargetedLoadResponse>, cooki return; } }; - true - } else { - false - }; + } // Loop to handle redirects. loop { |