LanX has asked for the wisdom of the Perl Monks concerning the following question:
I have problems to show my proper error page inside IE if the status is 4xx or 5xx.
In CB I got the tip to adjust Content-Length (Ambrus++) and indeed there seems to be a relation
The answer is that the server’s response must meet two criteria:The HTTP Status code must be [400, 403, 404, 405, 406, 408, 409, 410, 500, 501, 505] The HTTP Response body’s byte length must be shorter than a threshold value
If the server’s response meets both criteria, then IE will show its own Friendly HTTP Error page instead of the server’s terse response.
source http://blogs.msdn.microsoft.com/ieinternals/2010/08/18/friendly-http-error-pages/
but adding this doesn't help
print $query->header( -type => 'text/html', -charset => 'utf-8', -status => '400', -Content_Length => '100000', );
I noticed that FF shows the Content-length field of the reply with a lower case "l" no matter how I uppercase the -Content_Length option. (should be the same in IE, but the developer console doesn't help inspecting the header here)
Any suggestions?
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Je suis Charlie!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Own error-page with CGI.pm instead of "Friendly HTTP Error" in Internet-Explorer
by 1nickt (Canon) on Sep 13, 2017 at 20:07 UTC | |
by afoken (Chancellor) on Sep 13, 2017 at 22:51 UTC | |
by LanX (Saint) on Sep 13, 2017 at 21:54 UTC |