Closed Bug 1790355 Opened 2 years ago Closed 2 years ago

Handle Anchor in EarlyHintPreloader same as in the Preloader

Categories

(Core :: Networking: HTTP, task, P2)

task

Tracking

()

RESOLVED FIXED

People

(Reporter: manuel, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: [necko-triaged])

When the mAnchor refers to a different base URL, we should ignore the preload. We can probably also reuse the function used:

https://searchfox.org/mozilla-central/rev/9ddf68cc9e603276fc4c5253328cb3aeed6f0a55/dom/base/nsContentSink.cpp#303-309

// The link relation may apply to a different resource, specified
// in the anchor parameter. For the link relations supported so far,
// we simply abort if the link applies to a resource different to the
// one we've loaded
if (!LinkContextIsOurDocument(aHeader.mAnchor)) {
  return NS_OK;
}

And remove the NewResolveHref function from mozilla::net::LinkHeader

Whiteboard: [necko-triaged]

This is done in one of phase2 patches.

Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.