>Stas Bekman wrote: > > I'd suggest to put the mapping somewhere in the user docs and link from > the above link there... > > Probably somewhere around: > http://perl.apache.org/docs/2.0/user/handlers/http.html
Here are the proposed diffs. You can view the html at this url: http://redhotpenguin.com/mirrors/perl.apache.org/docs/2.0/user/handlers/http.html#HTTP_Status_Codes Stas do I need to add a reference to the modperlbook url this pod snippet came from? Comments on this welcome, I'll probably commit it revised sometime soonish unless anyone has objections. Index: /usr/local/modperl-docs/src/docs/2.0/api/Apache2/Const.pod =================================================================== --- /usr/local/modperl-docs/src/docs/2.0/api/Apache2/Const.pod (revision 396467) +++ /usr/local/modperl-docs/src/docs/2.0/api/Apache2/Const.pod (working copy) @@ -2583,9 +2583,9 @@ L<mod_perl 2.0 documentation|docs::2.0::index>. +L<HTTP Status Codes|docs::2.0::user::handlers::http/HTTP_Status_Codes>. - =head1 Copyright Index: /usr/local/modperl-docs/src/docs/2.0/user/handlers/http.pod =================================================================== --- /usr/local/modperl-docs/src/docs/2.0/user/handlers/http.pod (revision 396467) +++ /usr/local/modperl-docs/src/docs/2.0/user/handlers/http.pod (working copy) Extending HTTP under mod_perl is a trivial task. Look at L<the @@ -1788,10 +1793,144 @@ details. +=head1 HTTP Status Codes +The Hypertext Transfer Protocol (HTTP) is an application-level +protocol for distributed, collaborative, hypermedia information +systems. It is a generic, stateless, protocol which can be used for +many tasks beyond its use for hypertext, such as name servers and +distributed object management systems, through extension of its +request methods, error codes and headers. A feature of HTTP is the +typing and negotiation of data representation, allowing systems to be +built independently of the data being transferred. +HTTP 1.0 is described in Requests For Comments (RFC) 1945. HTTP 1.1 is +the latest version of the specifications and as of this writing HTTP +1.1 is covered in RFC 2616. +When writing mod_perl applications, usually only a small subset of HTTP +response codes is used, but sometimes you need to know others as +well. We will give a short description of each code and you will find +the extended explanation in the appropriate RFC. (Section 9 in RFC +1945 and section 10 in RFC 2616). You can always find the latest link +to these RFCs at the Web Consortium site, +I<http://www.w3.org/Protocols/>. +While HTTP 1.1 is widely supported, HTTP 1.0 still remains the +mainstream standard. Therefore we will supply a summary of the both +versions including the corresponding Apache constants. + +In mod_perl these constants can be accessed the +C<L<Apache::Constants|docs::1.0::api::Apache::Constants>> +package (e.g., to access the HTTP_OK constant use +C<Apache::Constants::HTTP_OK>). See the +C<L<Apache::Constants|docs::1.0::api::Apache::Constants>> manpage +for more information. + +In mod_perl2 these constants can be accessed the +C<L<Apache2::Const|docs::2.0::api::Apache2::Const>> +package (e.g., to access the HTTP_OK constant use +C<Apache2::Const::HTTP_OK>). See the +C<L<Apache2::Const|docs::2.0::api::Apache2::Const>> manpage +for more information. + +=head2 HTTP 1.0 Status Codes + + + Successful 2xx: + + 200 HTTP_OK OK + 201 HTTP_CREATED Created + 202 HTTP_ACCEPTED Accepted + 204 HTTP_NO_CONTENT No Content + + Redirection 3xx: + + 300 HTTP_MOVED_PERMANENTLY Multiple Choices + 301 HTTP_MOVED_TEMPORARILY Moved Permanently + 302 HTTP_SEE_OTHER Moved Temporarily + 304 HTTP_NOT_MODIFIED Not Modified + + Client Error 4xx: + + 400 HTTP_BAD_REQUEST Bad Request + 401 HTTP_UNAUTHORIZED Unauthorized + 403 HTTP_FORBIDDEN Forbidden + 404 HTTP_NOT_FOUND Not Found + + Server Error 5xx: + + 500 HTTP_INTERNAL_SERVER_ERROR Internal Server Error + 501 HTTP_NOT_IMPLEMENTED Not Implemented + 502 HTTP_BAD_GATEWAY Bad Gateway + 503 HTTP_SERVICE_UNAVAILABLE Service UnavailableStatus Codes + +=head2 HTTP 1.1 Status Codes + + Informational 1xx: + + 100 HTTP_CONTINUE Continue + 101 HTTP_SWITCHING_PROTOCOLS Switching Protocols + + Successful 2xx: + + 200 HTTP_OK OK + 201 HTTP_CREATED Created + 202 HTTP_ACCEPTED Accepted + 203 HTTP_NON_AUTHORITATIVE Non-Authoritative Information + 204 HTTP_NO_CONTENT No Content + 205 HTTP_RESET_CONTENT Reset Content + 206 HTTP_PARTIAL_CONTENT Partial Content + + Redirection 3xx: + + 300 HTTP_MULTIPLE_CHOICES Multiple Choices + 301 HTTP_MOVED_PERMANENTLY Moved Permanently + 302 HTTP_MOVED_TEMPORARILY Found + 303 HTTP_SEE_OTHER See Other + 304 HTTP_NOT_MODIFIED Not Modified + 305 HTTP_USE_PROXY Use Proxy + 306 (Unused) + 307 HTTP_TEMPORARY_REDIRECT Temporary Redirect + + Client Error 4xx: + + 400 HTTP_BAD_REQUEST Bad Request + 401 HTTP_UNAUTHORIZED Unauthorized + 402 HTTP_PAYMENT_REQUIRED Payment Required + 403 HTTP_FORBIDDEN Forbidden + 404 HTTP_NOT_FOUND Not Found + 405 HTTP_METHOD_NOT_ALLOWED Method Not Allowed + 406 HTTP_NOT_ACCEPTABLE Not Acceptable + 407 HTTP_PROXY_AUTHENTICATION_REQUIRED Proxy Authentication Required + 408 HTTP_REQUEST_TIMEOUT Request Timeout + 409 HTTP_CONFLICT Conflict + 410 HTTP_GONE Gone + 411 HTTP_LENGTH REQUIRED Length Required + 412 HTTP_PRECONDITION_FAILED Precondition Failed + 413 HTTP_REQUEST_ENTITY_TOO_LARGE Request Entity Too Large + 414 HTTP_REQUEST_URI_TOO_LARGE Request-URI Too Long + 415 HTTP_UNSUPPORTED_MEDIA_TYPE Unsupported Media Type + 416 HTTP_RANGE_NOT_SATISFIABLE Requested Range Not Satisfiable + 417 HTTP_EXPECTATION_FAILED Expectation Failed + + Server Error 5xx: + + 500 HTTP_INTERNAL_SERVER_ERROR Internal Server Error + 501 HTTP_NOT IMPLEMENTED Not Implemented + 502 HTTP_BAD_GATEWAY Bad Gateway + 503 HTTP_SERVICE_UNAVAILABLE Service Unavailable + 504 HTTP_GATEWAY_TIME_OUT Gateway Timeout + 505 HTTP_VERSION_NOT_SUPPORTED HTTP Version Not Supported + +=head2 References + +All the information related to web protocols can be found at the World +Wide Web Consortium site, I<http://www.w3.org/Protocols/>. + +There are many mirrors of the RFCs all around the world. One of the +good starting points might be I<http://www.rfc-editor.org/>. + =head1 Maintainers Maintainer is the person(s) you should contact with updates, @@ -1801,7 +1940,7 @@ =item * -Stas Bekman E<lt>stas (at) stason.orgE<gt> +Fred MoyerE<lt>fred(at) taperfriendlymusic.orgE<gt> =back @@ -1812,6 +1951,8 @@ =item * +Stas Bekman E<lt>stas (at) stason.orgE<gt> + =back Only the major authors are listed above. For contributors s --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
