Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Set HTTP Status code

by molybtek (Novice)
on Mar 09, 2012 at 01:02 UTC ( [id://958570]=note: print w/replies, xml ) Need Help??


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?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://958570]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-04-25 18:48 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found