Hi

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!


In reply to Own error-page with CGI.pm instead of "Friendly HTTP Error" in Internet-Explorer by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.