HTTP Error Status Code handling




14 years ago
9 years ago


(Reporter: sebflipper, Unassigned)


1.0 Branch
Windows XP

Firefox Tracking Flags

(Not tracked)




14 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.10) Gecko/20050717 Firefox/1.0.6
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.10) Gecko/20050717 Firefox/1.0.6

If a web site only sends back a HTTP Error status code (such as HTTP/1.0 404 Not
Found) and nothing else, a blank page is displayed. Other browsers normal tell
the user that an error was encountered. eg in Internet Explorer when only
"HTTP/1.0 404 Not Found" is sent back to the browser this is displayed:

Reproducible: Always

Steps to Reproduce:
1. On a PHP enabled server make a page called test.php
2. Paste the following code into it:
header("HTTP/1.0 404 Not Found");
3. Goto the page in Firefox, then try it again in Internet Explorer

Actual Results:  
Blank page is shown in Firefox, while a 404 error is displayed in Internet Explorer

Expected Results:  
Display a message to the user explaining why the page couldn't be loaded

Comment 1

14 years ago
Internet Explorer only displays its friendly error message if that option is
enabled.  See;en-us;Q294807

It's pretty rare for a server not to send back useful error text, and certainly
something that a server should not rely on given that only some IE clients will
auto-generate the error page (and maybe some other browsers do as well, but I
haven't used them).

RFC2616 has this to say:
10.4 Client Error 4xx

   The 4xx class of status code is intended for cases in which the
   client seems to have erred. Except when responding to a HEAD request,
   the server SHOULD include an entity containing an explanation of the
   error situation, and whether it is a temporary or permanent
   condition. These status codes are applicable to any request method.
   User agents SHOULD display any included entity to the user.

So, servers are supposed to include text, and the browser is supposed to display
it.  Other behavior isn't forbidden by the spec, but isn't called for either.
This bug was reported on Firefox 2.x or older, which is no longer supported and will not be receiving any more updates. I strongly suggest that you update to Firefox 3.6.3 or later, update your plugins (flash, adobe, etc.), and retest in a new profile. If you still see the issue with the updated Firefox, please post here. Otherwise, please close as RESOLVED > WORKSFORME
Version: unspecified → 1.0 Branch
No reply, INCOMPLETE. Please retest with Firefox 3.6.3 or later and a new profile ( If you continue to see this issue with the newest firefox and a new profile, then please comment on this bug.
Last Resolved: 9 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.