aboutsummaryrefslogtreecommitdiffstats
path: root/components/net/fetch/request.rs
diff options
context:
space:
mode:
authorMs2ger <ms2ger@gmail.com>2015-05-19 17:39:57 +0200
committerMs2ger <ms2ger@gmail.com>2015-05-19 17:41:31 +0200
commitfa4fe0175735a24fd4efa9bd5fb33436aeeeca11 (patch)
treeab28eee261aecae205b3aa8fc8483f2885af2c4b /components/net/fetch/request.rs
parent4ca6325bad1d93b4e5c552d4b75663852a2a8868 (diff)
downloadservo-fa4fe0175735a24fd4efa9bd5fb33436aeeeca11.tar.gz
servo-fa4fe0175735a24fd4efa9bd5fb33436aeeeca11.zip
Use snake case in fetch.
Diffstat (limited to 'components/net/fetch/request.rs')
-rw-r--r--components/net/fetch/request.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/components/net/fetch/request.rs b/components/net/fetch/request.rs
index 42a9b737a21..8ce58f819b5 100644
--- a/components/net/fetch/request.rs
+++ b/components/net/fetch/request.rs
@@ -114,7 +114,7 @@ pub struct Request {
}
impl Request {
- pub fn new(url: Url, context: Context, isServiceWorkerGlobalScope: bool) -> Request {
+ pub fn new(url: Url, context: Context, is_service_worker_global_scope: bool) -> Request {
Request {
method: Method::Get,
url: url,
@@ -122,7 +122,7 @@ impl Request {
unsafe_request: false,
body: None,
preserve_content_codings: false,
- is_service_worker_global_scope: isServiceWorkerGlobalScope,
+ is_service_worker_global_scope: is_service_worker_global_scope,
skip_service_worker: false,
context: context,
context_frame_type: ContextFrameType::ContextNone,
@@ -268,9 +268,9 @@ impl Request {
Some(location) => location,
};
// Step 5
- let locationUrl = Url::parse(location);
+ let location_url = Url::parse(location);
// Step 6
- let locationUrl = match locationUrl {
+ let location_url = match location_url {
Ok(url) => url,
Err(_) => return Response::network_error()
};
@@ -286,10 +286,10 @@ impl Request {
if self.redirect_mode == RedirectMode::Follow {
// FIXME: Origin method of the Url crate hasn't been implemented (https://github.com/servo/rust-url/issues/54)
// Substep 1
- // if cors_flag && locationUrl.origin() != self.url.origin() { self.origin = None; }
+ // if cors_flag && location_url.origin() != self.url.origin() { self.origin = None; }
// Substep 2
- if cors_flag && (!locationUrl.username().unwrap_or("").is_empty() ||
- locationUrl.password().is_some()) {
+ if cors_flag && (!location_url.username().unwrap_or("").is_empty() ||
+ location_url.password().is_some()) {
return Response::network_error();
}
// Substep 3
@@ -299,7 +299,7 @@ impl Request {
self.method = Method::Get;
}
// Substep 4
- self.url = locationUrl;
+ self.url = location_url;
// Substep 5
return self.fetch(cors_flag);
}