Why does FireFox incorrectly report "The image /path/imageFileName cannot be displayed because it contains errors."
Running FireFox Quantum 67.0.4 on Windows 10.
While developing a .NET Core 3.x WebAPI I was attempting to retrieve an image from the root and getting the following error: "The image /path/imageFileName cannot be displayed because it contains errors."
I then attempted to retrieve the image using Google Chrome and it provided a more correct error message: This localhost page can’t be found No webpage was found for the web address: https://localhost:5001/tmp547E.jpg
I noticed that even if I change the path to a file that doesn't exist FireFox still gives me this error.
Also, if I attempt to retrieve an HTML page that doesn't exist (https://localhost:5001/doesNotExist.htm) I see no error or any content at all in FireFox.
I do see one error message in FireFox console but it really isn't relevant to non-existent content: "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." doesNotExist.htm
However, in contrast, if I attempt to retrieve the page via Google Chrome then I get a valid error: This localhost page can’t be found No webpage was found for the web address: https://localhost:5001/doesNotExist.htm HTTP ERROR 404
Why doesn't FireFox provide 404 (not found) errors on localhost?
Additional System Details
- User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:67.0) Gecko/20100101 Firefox/67.0