in reply to Re: Need to respond with a 403 status code?
in thread Need to respond with a 403 status code?

And, to confuse things further -- you need to send a large enough response. (MS knowledgebase #294807 ... which I'd link to, but they'll make you authenticate and such)

Internet Explorer 5 and after will display a 'friendly' error message, which basically ignores the message sent, and just keys off of the error code -- if the message body is less than 512 bytes.

So, make sure that your error messages are large enough, so that they actually get displayed.

  • Comment on Re^2: Need to respond with a 403 status code?

Replies are listed 'Best First'.
Re^3: Need to respond with a 403 status code?
by JCHallgren (Sexton) on Apr 20, 2007 at 07:36 UTC
    THANKS to all who have so kindly replied!

    I've ended up with the following, which shows fine in IE 6, even though it's somewhat short:

    use CGI; $query = CGI::new(); print $query->header(-type=>'text/html', -status=>'403 Forbidden'); print $query->start_html('Acesss Forbidden!'); print $query->h1('Access Forbidden!'); print $query->p("Access to this resource is forbidden."); print $query->h2('Error 403'); print $query->end_html();


    As I have NO idea of exactly where to find default one from Apache on my host, and I may not have access to it via FTP anyway, so this will have to do...
Re^3: Need to respond with a 403 status code?
by Anonymous Monk on Apr 20, 2007 at 03:43 UTC
    So, make sure that your error messages are large enough, so that they actually get displayed.
    No.