mirror of
https://github.com/servo/servo.git
synced 2025-08-09 15:35:34 +01:00
Review fixes
This commit is contained in:
parent
8b9479f8bf
commit
9deecd793c
11 changed files with 44 additions and 549 deletions
|
@ -312,6 +312,8 @@ fn main_fetch(request: Rc<Request>, cache: &mut CORSCache, cors_flag: bool,
|
|||
if let Some(ref mut target) = *target {
|
||||
target.process_response_chunk(vec.clone());
|
||||
}
|
||||
} else {
|
||||
assert!(*response.body.lock().unwrap() == ResponseBody::Empty)
|
||||
}
|
||||
|
||||
// overloaded similarly to process_response
|
||||
|
@ -357,6 +359,8 @@ fn main_fetch(request: Rc<Request>, cache: &mut CORSCache, cors_flag: bool,
|
|||
// obtained synchronously via basic_fetch for data/file/about/etc
|
||||
// We should still send the body across as a chunk
|
||||
target.process_response_chunk(vec.clone());
|
||||
} else {
|
||||
assert!(*response.body.lock().unwrap() == ResponseBody::Empty)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -820,8 +824,10 @@ fn http_network_or_cache_fetch(request: Rc<Request>,
|
|||
if !http_request.use_url_credentials || !has_credentials(¤t_url) {
|
||||
authorization_value = Some(basic);
|
||||
}
|
||||
} else if authentication_fetch_flag {
|
||||
// Substep 5
|
||||
}
|
||||
|
||||
// Substep 5
|
||||
if authentication_fetch_flag && authorization_value.is_none() {
|
||||
if has_credentials(¤t_url) {
|
||||
authorization_value = Some(Basic {
|
||||
username: current_url.username().to_owned(),
|
||||
|
|
|
@ -435,9 +435,9 @@ fn strip_url(mut referrer_url: Url, origin_only: bool) -> Option<Url> {
|
|||
|
||||
/// https://w3c.github.io/webappsec-referrer-policy/#determine-requests-referrer
|
||||
pub fn determine_request_referrer(headers: &mut Headers,
|
||||
referrer_policy: Option<ReferrerPolicy>,
|
||||
referrer_url: Option<Url>,
|
||||
url: Url) -> Option<Url> {
|
||||
referrer_policy: Option<ReferrerPolicy>,
|
||||
referrer_url: Option<Url>,
|
||||
url: Url) -> Option<Url> {
|
||||
//TODO - algorithm step 2 not addressed
|
||||
assert!(!headers.has::<Referer>());
|
||||
if let Some(ref_url) = referrer_url {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue