Closed
Bug 1783686
Opened 3 years ago
Closed 2 years ago
Add test case for early hints returned before redirects.
Categories
(Core :: Networking: HTTP, task, P2)
Core
Networking: HTTP
Tracking
()
RESOLVED
FIXED
110 Branch
| Tracking | Status | |
|---|---|---|
| firefox110 | --- | fixed |
People
(Reporter: manuel, Assigned: manuel)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
Attachments
(1 file, 2 obsolete files)
Early hints before cross origin redirects should get cancelled, early hints before same-origin redirects should get used.
https://html.spec.whatwg.org/multipage/semantics.html#early-hints
Early hints after cross origin redirects should get used even if there was an early hint before the cross origin redirect.
| Assignee | ||
Comment 1•3 years ago
•
|
||
More specific:
This should use the preload
> GET /index.html HTTP/1.1
< 103 Early Hints
< Link: </image.png>; as=image; rel=preload
<
< 302 Redirect
< Location: /alternate.html
<
> GET /alternate.html HTTP/1.1
< 200 OK
< Content-Length: ...
<
< <html><body><img src="/image.png"></body></html>
Only the first early hint should get preloaded, the second one should not get preloaded:
> GET /index.html HTTP/1.1
< 103 Early Hints
< Link: </image.png>; as=image; rel=preload
<
< 302 Redirect
< Location: /alternate.html
<
> GET /alternate.html HTTP/1.1
< 103 Early Hints
< Link: </other.png>; as=image; rel=preload
<
< 200 OK
< Content-Length: ...
<
< <html><body><img src="/image.png"><img src="/other.png"></body></html>
This preload probably should not get used and can get cancelled when the redirect is returned:
> GET example.org/index.html HTTP/1.1
< 103 Early Hints
< Link: <https://example.net/image.png>; as=image; rel=preload
<
< 302 Redirect
< Location: https://example.net/index.html
<
> GET example.net/index.html HTTP/1.1
< 200 OK
< Content-Length: ...
<
< <html><body><img src="/image.png"></body></html>
The preload should get started 1-2 times and the last preload should get used (no non-preload request to the image should get made)
> GET example.org/index.html HTTP/1.1
< 103 Early Hints
< Link: <https://example.net/image.png>; as=image; rel=preload
<
< 302 Redirect
< Location: https://example.net/index.html
<
> GET example.net/index.html HTTP/1.1
< 103 Early Hints
< Link: </image.png>; as=image; rel=preload
<
< 200 OK
< Content-Length: ...
<
< <html><body><img src="/image.png"></body></html>
| Assignee | ||
Updated•3 years ago
|
Severity: -- → S4
Priority: -- → P2
Updated•3 years ago
|
Assignee: nobody → mleclair
Comment 2•3 years ago
|
||
Updated•3 years ago
|
Attachment #9295908 -
Attachment is obsolete: true
Comment 3•3 years ago
|
||
Updated•3 years ago
|
Attachment #9298139 -
Attachment is obsolete: true
| Assignee | ||
Updated•3 years ago
|
Assignee: mleclair → manuel
| Assignee | ||
Comment 4•3 years ago
|
||
Also adds test cases in combination with redirect of main document
Fixing two bugs:
- When cancelling all ongoing preloads the preload list wasn't cleared
- After redirects all preloads were ignored due to no set in
SetupReplacementChannel
Pushed by mbucher@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/53b4cf67f4f0
Fix Early Hints in combination with main document redirects r=necko-reviewers,kershaw
Comment 6•2 years ago
|
||
| bugherder | ||
Status: NEW → RESOLVED
Closed: 2 years ago
status-firefox110:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 110 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•