Manual Pages for UNIX Darwin command on man Apache::Constants
MyWebUniversity

Manual Pages for UNIX Darwin command on man Apache::Constants

Constants(3) User Contributed Perl Documentation Constants(3)

NAME

Apache::Constants - Constants defined in apache header files

SYNOPSIS

use Apache::Constants;

use Apache::Constants ':common';

use Apache::Constants ':response';

DESCRIPTION

Server constants used by apache modules are defined in hhttttppdd..hh and other header files, this module gives Perl access to those constants. EEXXPPOORRTT TTAAGGSS common This tag imports the most commonly used constants. OK DECLINED DONE NOTFOUND FORBIDDEN AUTHREQUIRED

SERVERERROR

response This tag imports the ccoommmmoonn response codes, plus these response codes: DOCUMENTFOLLOWS MOVED REDIRECT USELOCALCOPY BADREQUEST BADGATEWAY RESPONSECODES NOTIMPLEMENTED CONTINUE NOTAUTHORITATIVE CONTINUE n NOTAUTHORITATIVE ae lae fr DECLINED methods This are the method numbers, commonly used with the Apache mmeetthhooddnnuummbbeerr method. METHODS MCONNECT MDELETE MGET MINVALID

MOPTIONS

MPOST MPUT MTRACE MPATCH MPROPFIND MPROPPATCH MMKCOL MCOPY MMOVE MLOCK MUNLOCK options These constants are most commonly used with the Apache aalllloowwooppttiioonnss method: OPTNONE OPTINDEXES OPTINCLUDES OPTSYMLINKS OPTEXECCGI OPTUNSET OPTINCNOEXEC OPTSYMOWNER OPTMULTI OPTALL satisfy These constants are most commonly used with the Apache ssaattiissffiieess method: SATISFYALL SATISFYANY SATISFYNOSPEC remotehost These constants are most commonly used with the Apache ggeettrreemmootteehhoosstt method: REMOTEHOST

REMOTENAME

REMOTENOLOOKUP REMOTEDOUBLEREV http

This is the full set of HTTP response codes: (NOTE: not all imple-

mented here) HTTPOK HTTPMOVEDTEMPORARILY HTTPMOVEDPERMANENTLY HTTPMETHODNOTALLOWED HTTPNOTMODIFIED HTTPUNAUTHORIZED HTTPFORBIDDEN HTTPNOTFOUND HTTPBADREQUEST

HTTPINTERNALSERVERERROR

HTTPNOTACCEPTABLE HTTPNOCONTENT HTTPPRECONDITIONFAILED HTTPSERVICEUNAVAILABLE HTTPVARIANTALSOVARIES server These are constants related to server version: MODULEMAGICNUMBER SERVERVERSION SERVERBUILT config These are constants related to configuration directives: DECLINECMD types These are constants related to internal request types: DIRMAGICTYPE override

These constants are used to control and test the context of config-

uration directives. ORNONE ORLIMIT

OROPTIONS

ORFILEINFO ORAUTHCFG ORINDEXES ORUNSET ORALL ACCESSCONF RSRCCONF argshow RAWARGS TAKE1 TAKE2 TAKE12 TAKE3 TAKE23 TAKE123 ITERATE ITERATE2 FLAG NOARGS MMiissuusseess

You should be aware of the issues relating to using constant subrou-

tines in Perl. For example this:

$r->customresponse(FORBIDDEN => "File size exceeds quota.");

will not set a custom response for "FORBIDDEN", but for the string "FORBIDDEN", which clearly isn't what is expected. You'll get an error like this: [Tue Apr 23 19:46:14 2002] null: Argument "FORBIDDEN" isn't numeric in subroutine entry at ... Therefore, the best solution is not to use the hash notation for things that don't require it:

$r->customresponse(FORBIDDEN, "File size exceeds quota.");

Another important note is that instead of using HTTP codes, you should use designed for that purpose constants. Therefore, this is wrong: sub handler { return 200; } The correct use is:

use Apache::Constants qw(OK);

sub handler { return OK; } Also remember that "OK != HTTPOK". AUTHORS Doug MacEachern, Gisle Aas and h2xs

perl v5.8.6 2003-10-08 Constants(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™