servo/components/shared/net
Usman Yahaya Baba ff02fdad6d
Send early DevToolsHttpRequest and relocate response reporting to main_fetch (#37906)
This change refactors how we notify DevTools about network activity so
that all fetches (even those served from cache) appear correctly in the
Network panel, and so that DevTools sees request metadata as soon as
possible rather than waiting until the end of a full HTTP cycle.
- Before, we only send DevTools events inside http_network_fetch, so
cached responses (which skip that path) never show up. By emitting a
minimal HttpRequest event at the very start of main_fetch (with URL,
method, pipeline and browsing IDs), we guarantee every fetch shows up
immediately.
- Then, by moving HttpResponse notifications out of http_network_fetch
into main_fetch (right after process_response and process_response_eof),
we ensure DevTools gets status, header, and completion events for both
network and cache hits. Leveraging nullable fields in NetworkEventActor
lets us incrementally fill in timing, header, and body data later,
improving DevTools’ visibility.
Testing: Ran servo with `--devtools=6080` flag, cached responses now
appear in the network panel
Fixes: https://github.com/servo/servo/issues/37869

---------

Signed-off-by: Uthman Yahaya Baba <uthmanyahayababa@gmail.com>
2025-07-15 05:41:11 +00:00
..
fetch Use spec compliant content-type extraction in more places and enable a <stylesheet> quirk (#28321) 2025-05-19 11:38:01 +00:00
tests Implement basics of link preloading (#37036) 2025-05-29 11:26:27 +00:00
blob_url_store.rs Fix more clippy warnings in components/shared/net (#31548) 2024-03-10 17:47:38 +00:00
Cargo.toml Add support for static SVG images using resvg crate (#36721) 2025-05-27 11:02:40 +00:00
filemanager_thread.rs Don't slice a sliced blob (#36866) 2025-05-06 07:25:11 +00:00
http_status.rs Update to rust 1.85 (#35628) 2025-02-24 17:44:35 +00:00
image_cache.rs Add a basic caching mechanism for ImageKeys. (#37369) 2025-07-03 13:16:43 +00:00
indexeddb_thread.rs IndexedDB: communicate transaction errors and async response data more precisely (#38027) 2025-07-15 02:04:28 +00:00
lib.rs Initial IndexedDB Support (#33044) 2025-06-19 05:19:07 +00:00
mime_classifier.rs Implement basics of link preloading (#37036) 2025-05-29 11:26:27 +00:00
policy_container.rs Remove referrer policy from document (#34263) 2024-11-19 12:45:10 +00:00
pub_domains.rs Add memory reporting for public suffix list (#37049) 2025-05-19 18:50:22 +00:00
quality.rs Fixes for HTTP header compliance. (#32024) 2024-04-11 21:51:23 +00:00
request.rs Send early DevToolsHttpRequest and relocate response reporting to main_fetch (#37906) 2025-07-15 05:41:11 +00:00
response.rs Use spec compliant content-type extraction in more places and enable a <stylesheet> quirk (#28321) 2025-05-19 11:38:01 +00:00
storage_thread.rs storage: Isolate sessionStorage per top-level browsing context and copy sessionStorage when creating a new auxiliary browsing context (#37803) 2025-07-04 09:15:12 +00:00