Figure out what the right behaviour is for a forced download and a 404.
Categories
(Core :: DOM: Core & HTML, task)
Tracking
()
People
(Reporter: mattwoodrow, Unassigned)
References
Details
(Keywords: parity-chrome, parity-edge)
Attachments
(2 files)
We can have a download forced (either by a 'download' attribute on a link, or the Content-Disposition header), and still get a 404 response.
The current behaviour, here, is that we return NS_ERROR_FILE_NOT_FOUND from nsDocumentOpenInfo, and then the docshell displays a 'file not found' neterror page.
Bug 1574372 is changing behaviour so that the content process takes this path, returns NS_ERROR_WONT_HANDLE_CONTENT, and is handled silently.
html/semantics/text-level-semantics/the-a-element/a-download-click-404.html is a web-platform-test that requires the silent no-load behaviour, at least for the link attribute variation. We previously failed this, and will now pass after bug 1574372.
Other browser behaviour (for top-level loads and the Content-Disposition header, testing script attached):
- Chrome - Displays a net error page
- Safari - Displays the 404 content
- Edge - Displays a net error page
Comment 1•4 years ago
|
||
Hmm. So in the other browsers @download is not equivalent to a server-sent Content-Disposition header, right?
Reporter | ||
Comment 2•4 years ago
|
||
That's correct.
Added a second part of the testcase that shows behaviour of various links:
Edge:
- Download attribute + 404 (regardless of Content-Disposition) - Couldn't download dialog at bottom
- Normal 404 link - Loads 404 content page
- 404 link + Content-Disposition:attachment - Silently ignored.
Chrome:
- Download attribute + 404 (regardless of Content-Disposition) - Couldn't download dialog at bottom
- Normal 404 link - Loads 404 content page
- 404 link + Content-Disposition:attachment - Loads net error page.
Firefox (right now):
- Download attribute + 404 (regardless of Content-Disposition) - Loads net error page.
- Normal 404 link - Loads 404 content page
- 404 link + Content-Disposition:attachment - Loads net error page.
Firefox (post-bug 1574372)
- Download attribute + 404 (regardless of Content-Disposition) - Silent.
- Normal 404 link - Loads 404 content page
- 404 link + Content-Disposition:attachment - Silent.
Comment 4•2 years ago
|
||
Matt, based on Bug 1744220 other browsers like Edge and Chrome are indeed showing a download error when there's a download attribute.
This is marked as a Task but we may actually consider it a defect, based on users expectations.
Do we have a plan for it?
Updated•2 years ago
|
Comment 5•2 months ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE
.
For more information, please visit BugBot documentation.
Description
•