mirror of
https://github.com/servo/servo.git
synced 2025-07-20 22:03:42 +01:00
devtools: Use request destination as cause_type in NetworkEventActor (#38162)
The cause_type in NetworkEventActor was derived from a hard-coded pattern match on the request URL file extension. This patch replaces the hard-coded pattern matching with the Destination field of Request, to provide a better alignment with the Fetch specification. Testing: Updated unit tests. Fixes: #38151 --------- Signed-off-by: Kingsley Yung <kingsley@kkoyung.dev>
This commit is contained in:
parent
a52f9fd9a9
commit
0537c29064
5 changed files with 15 additions and 9 deletions
|
@ -23,6 +23,7 @@ use http::{HeaderMap, Method};
|
|||
use ipc_channel::ipc::IpcSender;
|
||||
use malloc_size_of_derive::MallocSizeOf;
|
||||
use net_traits::http_status::HttpStatus;
|
||||
use net_traits::request::Destination;
|
||||
use serde::{Deserialize, Serialize};
|
||||
use servo_url::ServoUrl;
|
||||
use uuid::Uuid;
|
||||
|
@ -443,6 +444,7 @@ pub struct HttpRequest {
|
|||
pub time_stamp: i64,
|
||||
pub connect_time: Duration,
|
||||
pub send_time: Duration,
|
||||
pub destination: Destination,
|
||||
pub is_xhr: bool,
|
||||
pub browsing_context_id: BrowsingContextId,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue