Open
Bug 1784025
Opened 3 years ago
Updated 3 years ago
Test preloading multipart image with unknown content-type
Categories
(Core :: Networking: HTTP, task, P2)
Core
Networking: HTTP
Tracking
()
NEW
People
(Reporter: manuel, Unassigned)
References
(Blocks 1 open bug)
Details
(Whiteboard: [necko-triaged])
The early hint preloader loads content similar to the main document.
mozilla::net::DocumentLoadListener::OnDataAvailable:
This isn't supposed to happen, since we suspended the channel, but
sometimes Suspend just doesn't work. This can happen when we're routing
through nsUnknownDecoder to sniff the content type, and it doesn't handle
being suspended. Let's just store the data and manually forward it to our
redirected channel when it's ready.
So the test should trigger the "sometimes Suspend just doesn't work".
I think the code could be triggered if the preloaded image returns something like this:
200 OK
Content-Type: multipart/x-mixed-replace; boundary=String_separator
--String_separator
Content-type: image/png
atob("iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAADklEQVQIW2OU+i/FAAcADoABNV8XGBMAAAAASUVORK5CYII=") // green/black horizontal stripes
--String_separator
Content-type: image/png
atob("iVBORw0KGgoAAAANSUhEUgAAAAIAAAACCAIAAAD91JpzAAAAE0lEQVQIW2P4//+/N8MkBiAGsgA1bAe1SzDY8gAAAABJRU5ErkJggg==") // purple/white checkered pattern
--String_separator--
Further reading on multipart content-type:
- https://en.wikipedia.org/w/index.php?title=MIME&oldid=1103600744#Multipart_subtypes
- for 206 responses: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206 (but can also happen in 200 responses?)
- Example server demonstrating
multipart/x-mixed-replace
: https://github.com/yscoder/multipart-x-mixed-replace-example
Reporter | ||
Updated•3 years ago
|
Blocks: earlyhints
Reporter | ||
Updated•3 years ago
|
Summary: Test preloading multipart image with unknown → Test preloading multipart image with unknown content-type
Reporter | ||
Comment 1•3 years ago
•
|
||
Multi-part support was added in this bug to DocumentLoadListener
See Also: → 1600211
You need to log in
before you can comment on or make changes to this bug.
Description
•