Gorby has asked for the wisdom of the Perl Monks concerning the following question:

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re: http return code 200
by davorg (Chancellor) on Feb 02, 2007 at 13:52 UTC
Re: http return code 200
by jhourcle (Prior) on Feb 02, 2007 at 13:49 UTC

    200 means the request was completed successfully. See the HTTP specs, section 10 for the different status codes and what they mean.

    As for how to generate them in perl, it's as simple as:

    print "200 ok\n\n";

    If you're talking HTTP/0.9 ... if you're using the CGI module, 200 is assumed when you call

    header()

    ... if you want some other code, call

    header( -status => $code )
Re: http return code 200
by marto (Cardinal) on Feb 02, 2007 at 13:55 UTC
    Hi Gorby,

    What exactly does "http return code 200" mean

    Check out the HTTP status code definitions here. Check out CGI Programming section the Tutorials section of this site regards achieving this using the CGI module.

    Hope this helps

    Martin
Re: http return code 200
by Trizor (Pilgrim) on Feb 02, 2007 at 21:57 UTC
    A speedier but more complex alternative to CGI.pm suggested in the other comments is of course mod_perl and Apache. If you are running in an apache environment all you need to do is return  Apache2::Const::OK; from a handler, or simply not error out in a Registry or PerlRun script. Apache will handle the HTTP Status code for you.