Bug 9387 - HTTP 406 error not displayed in user's language
Summary: HTTP 406 error not displayed in user's language
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: 420+
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://web.nickshanks.com/browsers/sa...
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2006-06-10 04:35 PDT by Nicholas Shanks
Modified: 2023-03-27 09:03 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Shanks 2006-06-10 04:35:26 PDT
When a webserver cannot find a suitable document to return, it instead sends back a HTTP 406 error with an exhaustive Alternates header containing every varient of the requested URI available. If answering a GET request it also sends back (in Apache's case) a HTML 2.0 document written /in english/.

I feel that WebKit could do better here, and use the Alternates header to tell the user what went wrong, generate it's own list of alternates in the user's primary language (as determined from AppleLanguages), and make it look pretty too.

rdar://problem/4575352
Comment 1 Nicholas Shanks 2006-06-15 12:41:13 PDT
You could even use UTIs to look up the local name for MIME types, and display "Adobe Photoshop document" instead of "image/psd".
Comment 2 Nicholas Shanks 2006-06-29 03:54:39 PDT
From the Apache documentation on serving custom error messages:

Microsoft Internet Explorer (MSIE) will by default ignore server-generated error messages when they are "too small" and substitute its own "friendly" error messages. The size threshold varies depending on the type of error, but in general, if you make your error document greater than 512 bytes, then MSIE will show the server-generated error rather than masking it. More information is available in Microsoft Knowledgebase article Q294807 http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807
Comment 3 Anne van Kesteren 2023-03-27 09:03:17 PDT
This behavior is not allowed by the HTML Standard and given the mess servers make of status codes I don't think it would end up helping end users.