aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/http_loader.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/net/http_loader.rs')
-rw-r--r--components/net/http_loader.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/components/net/http_loader.rs b/components/net/http_loader.rs
index 94e455df9d6..dc31dc3b2c7 100644
--- a/components/net/http_loader.rs
+++ b/components/net/http_loader.rs
@@ -44,6 +44,7 @@ use time::Tm;
#[cfg(any(target_os = "macos", target_os = "linux"))]
use tinyfiledialogs;
use url::Url;
+use util::prefs;
use util::resource_files::resources_dir_path;
use util::thread::spawn_named;
use uuid;
@@ -726,10 +727,7 @@ pub fn load<A, B>(load_data: LoadData,
user_agent: String,
cancel_listener: &CancellationListener)
-> Result<StreamedResponse<A::R>, LoadError> where A: HttpRequest + 'static, B: UIProvider {
- // FIXME: At the time of writing this FIXME, servo didn't have any central
- // location for configuration. If you're reading this and such a
- // repository DOES exist, please update this constant to use it.
- let max_redirects = 50;
+ let max_redirects = prefs::get_pref("network.http.redirection-limit").as_i64().unwrap() as u32;
let mut iters = 0;
// URL of the document being loaded, as seen by all the higher-level code.
let mut doc_url = load_data.url.clone();