Refactor the navigation fetch and decode layering (#99618)
Navigation and prefetch requests go through `createFetch`, which had grown several jobs beyond fetching. It decoded navigation responses itself (so React DevTools could time the request from the moment it was sent), with a flag for prefetches to opt out and a separate wrapper stream for HMR refreshes that can be superseded. With Cache Components, it also stripped the leading partial marker byte by rebuilding the Response around the stripped stream, and tee'd every response so a full prefetch could cut its shell from a second copy of the body. Every caller paid for the tee and the rebuilt Response, including ones that never needed them. This PR untangles those layers. Each commit can be reviewed on its own. This is mostly a restructuring, to make the subsequent PRs in the stack easier. No meaningful outward behavior changes.
Showing
This diff is collapsed.
This diff is collapsed.
Please
register
or
sign in
to comment