Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update fetch methods #17521

Merged
merged 10 commits into from Aug 19, 2017

Update HTTP-network fetch

  • Loading branch information
KiChjang committed Aug 18, 2017
commit 34178bdd4cd8a7cc3dc9850fded4515fd54d36b6
@@ -1024,8 +1024,6 @@ fn http_network_fetch(request: &Request,
done_chan: &mut DoneChannel,
context: &FetchContext)
-> Response {
// TODO: Implement HTTP network fetch spec

// Step 1
// nothing to do here, since credentials_flag is already a boolean

@@ -1036,6 +1034,9 @@ fn http_network_fetch(request: &Request,
// TODO be able to tell if the connection is a failure

// Step 4
// TODO: check whether the connection is HTTP/2

// Step 5
let url = request.current_url();

let request_id = context.devtools_chan.as_ref().map(|_| {
@@ -1150,10 +1151,10 @@ fn http_network_fetch(request: &Request,

// TODO Read request

// Step 5-9
// Step 6-11
// (needs stream bodies)

// Step 10
// Step 12
// TODO when https://bugzilla.mozilla.org/show_bug.cgi?id=1030660
// is resolved, this step will become uneccesary
// TODO this step
@@ -1165,24 +1166,22 @@ fn http_network_fetch(request: &Request,
}
};

// Step 11
// Step 13
// TODO this step isn't possible yet (CSP)

// Step 12
if response.is_network_error() && request.cache_mode == CacheMode::NoStore {
// Step 14
if !response.is_network_error() && request.cache_mode != CacheMode::NoStore {
// TODO update response in the HTTP cache for request
}

// TODO this step isn't possible yet
// Step 13

// Step 14.
// Step 15
if credentials_flag {
set_cookies_from_headers(&url, &response.headers, &context.state.cookie_jar);
}

// TODO these steps
// Step 15
// Step 16
// Substep 1
// Substep 2
// Sub-substep 1
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.