Re: Perl CGI Response codes other than 200 OK

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Don Russell <fedora <at> drussell.dnsalias.com> writes:
> 
> I've spent most of yesterday trying to solve this by searching google... 
> 
> I'm trying to use HTTP::Response to create a response when my perl cgi
> program is run.
> 

Why are you using HTTP::Response?  That is the class for representing responses
from the server in LWP, the HTTP client module.  It is not for generating
responses on the server-side.

If you are using CGI, then use the header() method.  It takes a -status option.

If you are using mod_perl, it is $r->status().  Apache2::Const for mod_perl2
contains constants for the different statuses like OK.

 - Ian



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux