Internet Explorer, 512-byte error page fix doesn't work. Neglects gzip compression.
|Reported by:||charris||Owned by:|
Internet Explorer won't display a custom error page (e.g., the one generated by WordPress after a comment form validation fails) if the resulting page is less than 512 bytes; in this scenario, IE will display its own proprietary error message instead. This can prevent the user from seeing important WordPress error messages (such as form validation errors after submitting a comment). (See http://perishablepress.com/press/2008/01/21/important-note-for-your-custom-error-pages/ for more info on this IE bug).
A WordPress developer attempted to fix this problem. In wp-includes/functions.php, line 2293, the str-repeat() function is used in an attempt to pad the error page with enough characters such that the resulting HTTP response will be greater than 512 bytes, therefore avoiding the aforementioned Internet Explorer problem.
The problem is that the WordPress developer neglected to account for gzip compression being used in sending the HTTP response message to the browser. In other words, the error page may have 512 characters, but after being compressed, is smaller than 512 bytes.
Proposed resolution is to always pad the error page with enough characters such that it is greater than 512 bytes, even after gzip compression.
Change History (26)
comment:20 in reply to: ↑ 19 hakre — 4 years ago
- Keywords dev-feedback added; has-patch tested commit removed