Represent client, omitted, and explicit Fetch referrers directly. Capture
the client URL at request initialization and carry it into derived requests
without consulting the Cookie initiator when generating Referer.
Keep explicit selection independent of builder ordering and Cookie scope
updates. Retain redirect policy reduction so a later permissive policy
cannot restore an omitted referrer or stripped path.
Cover Window/Worker initialization order, Cookie initiator and scope
replacement, preflight inheritance from a different client, and navigation
default initialization.
Keep method-independent site limits and redirect diagnostic history apart
from the current HTTP method. Compute SameSite outcomes and both diagnostic
tracks when read, with one canonical method input. Method overrides no
longer reverse-repair cached SameSite results or duplicated metadata.
Preserve explicit CrossSite restrictions, scope rebinding, partition keys,
and historical downgrade diagnostics. Keep cache key material unchanged
while moving consumers to the computed context API.
Cover method round trips without history mutation and retain distinct
diagnostics when different histories end with the same CrossSite result.
Commit Referer reduction, method/body rewriting, Cookie context advancement,
current URL, origin key and redirect count through one runtime helper.
Retain Request.url as the initial URL. Each transport still owns response
collection, caching and cancellation, while HTTPS upgrades stay separate.
Run current-request tests through network_cookie_context and redirected tests
through follow_redirect, preserving Cookie header and diagnostic assertions.
Remove the test-only effective_cookie_context implementation.
Add an initiator-only update that preserves browser scope and partitioning.
Share per-track metadata operations, advance contexts without cloning URLs,
and use request-type accessors instead of constructing throwaway contexts.
Require the actual next-hop method in advance_cookie_request_context and
update method safety and both metadata tracks before preserving site limits.
Remove the repeated synchronization from the five HTTP redirect branches;
pass the actual method through HTTPS upgrades and caller-followed redirects.
Cover GET-to-POST and POST-to-GET overrides starting from computed Lax/Unsafe
contexts, including explicit CrossSite limits. Check actual Cookie headers
in every transport, distinguishing fresh and aged default cookies from Lax.
Bind the request retained by the CORS redirect loop to the loader's cookie
scope before dispatching single-hop transport copies. Reuse the transport
binding so frame partition keys and Storage Access settings stay intact.
Preserve the selected referrer before Cookie origin adaptation, including
an absent referrer. Keep this in Request::follow_redirect and remove the
navigation-only duplicate.
Add live-server regressions for inherited-origin iframe fetch and sync/async
XHR, plus a multi-hop referrer test with a permissive response policy.
No production caller classifies RequestModeError. Use anyhow results, context and guards while retaining the same mode checks and diagnostics, and assert rejection details instead of downcasting in the test.
Return the request executor and accumulated observation journal from an
unpaused redirect decision instead of cloning them for each hop. Keep the
same objects in PendingFetchNavigation only while a request is paused,
and remove Clone from NavigationInterception.
Share the transport URL, method, headers, body and redirect-header update
between main and child documents without cloning the complete Request.
Rename the redirect execution switch to set_manual_redirects so its role
is distinct from Fetch pattern matching.
Build on native cache request controls to support force-cache and only-if-cached. Reuse eligible stale entries without validation and reject misses before connecting on every transport. Check cancellation before streaming cache admission, retaining Vary, partition and cached-redirect security checks. Native wire/cache regressions cover stale reuse, misses, privacy boundaries, redirects and pre-cancelled HTML/raw requests.
Extracted from development commit ff934e4f294.
Base: wpt/20261102-http-cache-request-controls (47ffbe16e8).
Validation (32 build jobs and test threads): cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
Summary [ 139.288s] 22176 tests run: 22176 passed (9 slow), 20 skipped
Name the internal Accept-only operation explicitly and call FetchClient preparation directly from renderer request paths. Inline the Page header merger and move existing request fields into the overlay instead of cloning them.
Support type: text through the shared module map, Window, child Documents and workers. Export UTF-8 decoded strings without executing their contents, preserve typed-module identity, and carry text request metadata through network, preload and Service Worker loaders. Regressions cover static/dynamic import sharing, BOM and invalid UTF-8, CORS, integrity, worker environments and unsupported-type rejection.
Extracted from development commit a6de018613.
Base: main (62e527cd34).
Validation (32 build jobs and test threads): cargo fmt --all; cargo clippy --workspace --all-targets --all-features -- -D warnings; cargo nextest run --no-fail-fast.
Summary [ 146.817s] 22203 tests run: 22203 passed (9 slow), 20 skipped
A retained top-level cookie context must not mark a non-navigation Fetch
as user-activated. Restore the navigation-mode guard at the shared emitter.
Cover absent initiators across CORS modes, restore HTTP and HTTPS Origin
redirect cases, assert exact redirect site metadata, and preserve explicit
embedder headers without duplication.
Use one Fetch Metadata emission path for browser navigations and subresources. Suppress generated Sec-Fetch headers when the current destination is not potentially trustworthy, including after redirects, while retaining loopback and localhost HTTP support.
Validation (32 build jobs / test threads, zero retries):
- `cargo fmt --all`
- `cargo clippy --workspace --all-targets --all-features -- -D warnings`
- `cargo nextest run --no-fail-fast`: Summary [ 152.548s] 22026 tests run: 22026 passed (9 slow), 19 skipped
The existing from_cache flag collapses fresh local responses and revalidated 304 responses into the same state, producing incorrect Resource Timing transferSize.
Carry explicit cache state through buffered and streamed fetches, navigation, subresource snapshots and response interception. Resource Timing reports zero transfer for local hits, validation overhead for merged 304 responses, and body bytes plus header overhead for network responses. Cover disk and memory cache state in the HTTP timing fixture and native response tests.
Run dedicated-worker close cleanup as an ordinary async workflow in the
existing in-flight entry. Join the original session disposal, reject new
attachments during retirement, and bind cleanup to the original worker and
session lifetimes. Preserve earlier captured auto-attach facts while retiring
any original binding they publish during close.
Return command contexts, typed events, exact renderer boundaries and actual
terminals to the original scope on cancellation or discarded results. Resume
admitted cleanup rather than restarting it, and finish precise resource cleanup
after a workflow panic. Settle pending worker calls at close admission so the
original Target-detached terminal stays before the close acknowledgement.
Preserve the existing typed FetchCancelled cause when cancellation ends curl
through its write callback, keeping the original transport error and metadata.
Validation: cargo fmt --all; full workspace/all-targets/all-features Clippy;
root nextest 21,007 passed /19 skipped; five state-access doctests; 70 focused
cleanup tests; 32 stress rounds for raw/Digest and HTML typed cancellation.
Final-source CLI checks passed: worker close 3/3 with two sessions, held promise
and peer progress; CDP 12/12, captured/auth 7/7, child navigation, Playwright, and
debugger-held activation/Page.close/Target.close. All 4,805 Rust/Cargo input
hashes remained identical across final checks, CLI build and staging.
Move session disposal, frontend teardown, target activation and closure waits
out of connection borrows into supervised workflows. Retain exact binding
identities and command output ownership through cancellation and discarded
ready results.
Complete Native and finite query results synchronously and run Input
download and file chooser completion as owned async work. Preserve response
and renderer publication order, and release the actor while Tab auto-attach
joins an existing initial-document installation.
Make the meta-refresh shutdown regression wait for its successor document
before asserting exact DOM output.
Validation: cargo fmt --all; full workspace Clippy with warnings denied;
cargo nextest run --no-fail-fast (20,973 passed, 19 skipped); real CLI,
Playwright, paused-renderer, Fetch-close and Input checks.
Keep intercepted document requests, authentication, captured responses and native
commit/adoption in ordinary async workflows with exact navigation ownership.
Move child lifecycle waits and Fetch.disable cleanup out of actor completion,
retain source response obligations through cancellation, and preserve ACK timing.
Prepare owned session policy/script/worker cleanup and a synchronous state owner
with weak handles and compile-time borrowing constraints. Retain explicit legacy
inline drivers until disposal, frontend control and adapter paths migrate.
Preserve typed error contexts and share the inline Fetch driver with BiDi adapters
so they cannot wait on their own unserviced state mailbox.
Validation: cargo fmt --all; complete workspace Clippy with all targets/features
and warnings denied; root nextest 20,941 passed, 19 skipped; protocol doctests
1 positive and 4 compile-fail cases passed.
Filter configured and request Authorization headers against the initial
transfer origin at the shared outgoing-header boundary. Remove the
unconditional Basic auth fallback that bypassed the origin guard.
Bind native server credentials when supplied and enforce that scope for
Basic and libcurl-managed authentication, preserving proxy credentials
and explicit auth responses to later redirect targets.
Cover all three HTTP transports, mutable caller-managed redirect URLs,
same-origin and foreign Digest challenges, and fresh destination grants.
Share literal Cookie selection between header emission and cache eligibility.
Unbound data, out-of-scope hosts and credentials-suppressed literals no longer
disable the disk cache. Requests that actually send cookies still bypass
lookup and storage, preserving any earlier public entry.
Cover raw and HTML streams with fresh network runtimes and both request-level
and configured Cookie data, including credentials omit and cross-origin
same-origin requests.
Keep serve --cookie DATA and bind its default host at the first HTTP(S)
top-level navigation. Share the binding across cloned configurations and
network runtimes so frames, workers, later pages and browser contexts cannot
claim or expand it. Subrequests use host-only matching; scoped top-level
transfers retain curl-compatible redirect propagation.
Keep literal data separate from the Cookie Store and preserve credentials
checks, imported cookie scopes and request-level CLI cookie behavior.
Bind at navigation entry before Service Worker interception as well as at
HTTP runtime admission, so synthetic responses do not delay the scope choice.
Apply the Cookie Store credentials decision to both configured and
request-specific literal Cookie data. This excludes browser omit requests
and cross-origin same-origin requests, including credentialless OPTIONS
preflights, while CLI fetches retain their Include credentials policy.
Cover both configuration sources, every fetch transport and the actual
renderer preflight followed by a credentialed request.
Filter CLI Cookie headers at the shared outgoing-header boundary using the
initial URL hostname, scheme and effective port. Keep the configured header
list intact so returning to the initial origin restores curl behavior.
Literal Cookie data and per-target Cookie Store selection stay separate.
Cover default and per-request headers, casing and duplicates, redirected
header restoration, all fetch transports and CLI cookie combinations.