mirror of
https://github.com/servo/servo.git
synced 2025-08-07 14:35:33 +01:00
Added fetch_start functionality in http_fetch
Added spec link for webidl. Added fetch_start functionality to PRT . Changed the fetch_start location
This commit is contained in:
parent
3ca82471c8
commit
77c9285780
6 changed files with 27 additions and 20 deletions
|
@ -560,8 +560,6 @@ pub fn http_fetch(
|
|||
request.service_workers_mode = ServiceWorkersMode::None;
|
||||
}
|
||||
|
||||
// Substep 3
|
||||
// TODO(#21258) maybe set fetch_start (if this is the last resource)
|
||||
// Generally, we use a persistent connection, so we will also set other PerformanceResourceTiming
|
||||
// attributes to this as well (domain_lookup_start, domain_lookup_end, connect_start, connect_end,
|
||||
// secure_connection_start)
|
||||
|
@ -695,6 +693,13 @@ pub fn http_redirect_fetch(
|
|||
Some(Ok(url)) => url,
|
||||
};
|
||||
|
||||
// Step 1 of https://w3c.github.io/resource-timing/#dom-performanceresourcetiming-fetchstart
|
||||
context
|
||||
.timing
|
||||
.lock()
|
||||
.unwrap()
|
||||
.set_attribute(ResourceAttribute::FetchStart);
|
||||
|
||||
// Step 5
|
||||
if request.redirect_count >= 20 {
|
||||
return Response::network_error(NetworkError::Internal("Too many redirects".into()));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue