HTTP 404 with zero content isn't clearly visible
Summary
When I open an invalid/outdated link like https://qntm.org/invalid , Ladybird only shows a blank page, which is a bit confusing. "What's going on? Is it still loading? Why is it showing a blank screen? Which of the thousands of possible culprit has caused this?"
The root cause seems to be that Ladybird doesn't treat the response "HTTP/1.1 404 Not Found, Content-Length: 0" in any special way, like users might expect.
In fact, Ladybird already does it in some special cases:
- TLS issues like with https://expired.badssl.com/ cause Ladybird to inject some special content, to tell the user what's going on. Good!
- Unable to resolve host: Again, Ladybird injects some special content, to tell the user what's going on. Good!
So why show a blank page instead of telling the User that there's been a 404?
I assume it's going to be very similar for:
- Redirect loops (HTTP 301 or 302 to itself)
- Other forms of "doesn't exist" (HTTP 420)
- Any kind of "Content-Length: 0" for a non-2xx-Code (e.g. 400 Bad request, 410 Gone, 403 Forbidden, 5xx Server Error)
Probably unrelated: I have some weird issue with DNS, and need to use 8.8.8.8 as DNS server, because "system DNS" doesn't seem to work. Huh.
Operating system
Linux
Steps to reproduce
- Open https://qntm.org/invalid or any other page that returns "HTTP/1.1 404 Not Found, Content-Length: 0" (check with
curl -vto make sure.) - Watch the content of the viewport
Expected behavior
After receiving the 404 without any human-visible content, Ladybird should give some kind of visual indication of what happened: The page has finished loading, that there is a failure, and what kind.
Actual behavior
The screen stays blank, barely even indicating that the page has finished loading. There is no indication that Ladybird knows that there is a failure, let alone what kind of failure (404).
URL for a reduced test case
HTML/SVG/etc. source for a reduced test case
N/ALog output and (if possible) backtrace
NoneScreenshots or screen recordings
Build flags or config settings
Default, 3de5d7113851c5a8b630fc03eb74d384e6658968
Source: LadybirdBrowser/ladybird