in reply to Re: Set HTTP Status code
in thread Set HTTP Status code

This is getting weirder... Using a test script as shown below, it works with mod_perl.
#!/usr/bin/perl use CGI qw/:standard/; header(-status => 404);
However, if I specified something in the query string, then the status is still set as 404, however, it displays

Not Found

The requested URL /cgi-bin/portal/browselocation.pl was not found on this server.

Additionally, a 302 Found error was encountered while trying to use an ErrorDocument to handle the request.

Replies are listed 'Best First'.
Re^3: Set HTTP Status code
by Anonymous Monk on Mar 09, 2012 at 01:37 UTC

    This is getting weirder...

    So its been a few months, but you're still omitting all the critical details. Do you want help, yes or no?

      I'm not quite sure what critical details you need...

      It is hosted on a CentOS 5 machine.

      • Apache is Apache/2.2.3
      • Perl is 5.8.8
      • CGI module is 3.5.9
      • mod_perl is 2.0.4-6.el5

        I'm not quite sure what critical details you need...

        Basically all details needed to reproduce the problem you're seeing

        Are you running the program under mod_cgi? under mod_perl and ModPerl::Registry? What filename is the program saved under? What url is mapped to the filename?