Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: ModPerl: Docs-dev

status codes in Apache2::Const ?

 

 

ModPerl docs-dev RSS feed   Index | Next | Previous | View Threaded


modperl-list at 2xlp

Aug 1, 2006, 10:28 PM

Post #1 of 22 (14129 views)
Permalink
status codes in Apache2::Const ?

How would people feel about putting the numerical status codes in the
Apache2::Const docs

They're not there now, its kind of a bitch to flip back and forth
through misc docs to find it

i couldn't actually find a mapping of the apache constants in the
modperl dist- everything seems to pull from apache's internals directly

they are in the mod_perl book:

http://modperlbook.org/pdf/appf.pdf



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


geoff at modperlcookbook

Aug 2, 2006, 5:37 AM

Post #2 of 22 (13907 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Jonathan Vanasco wrote:
>
> How would people feel about putting the numerical status codes in the
> Apache2::Const docs
>
> They're not there now, its kind of a bitch to flip back and forth
> through misc docs to find it

patches welcome :)

>
> i couldn't actually find a mapping of the apache constants in the
> modperl dist- everything seems to pull from apache's internals directly

of course. see httpd-2.x/includes/httpd.h

--Geoff

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


stas at stason

Aug 28, 2006, 5:40 PM

Post #3 of 22 (13849 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Jonathan Vanasco wrote:
>
> How would people feel about putting the numerical status codes in the
> Apache2::Const docs
>
> They're not there now, its kind of a bitch to flip back and forth
> through misc docs to find it
>
> i couldn't actually find a mapping of the apache constants in the
> modperl dist- everything seems to pull from apache's internals directly

constants are precisely there so that one doesn't need to rely on numbers
which may change in the future versions of httpd. Granted the HTTP code
constants won't change, but the rest could. And mp2/httpd2 has hundreds of
those constants, compared to a few dozens in mp1/httpd1.3

May be a reference to httpd-2.x/includes/httpd.h (as suggested by Geoff)
should be sufficient for users who understand the risk they are undertaking.

--
_____________________________________________________________
Stas Bekman mailto:stas [at] stason http://stason.org/
MailChannels: Reliable Email Delivery http://mailchannels.com
The "Practical mod_perl" book http://modperlbook.org/
http://www.linkedin.com/in/stasbekman http://perl.apache.org/
http://stason.org/photos/gallery/ [* best photos here *]


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


jvanasco at 2xlp

Aug 28, 2006, 6:44 PM

Post #4 of 22 (13851 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

On Aug 28, 2006, at 8:40 PM, Stas Bekman wrote:
> constants are precisely there so that one doesn't need to rely on
> numbers which may change in the future versions of httpd. Granted
> the HTTP code constants won't change, but the rest could. And mp2/
> httpd2 has hundreds of those constants, compared to a few dozens in
> mp1/httpd1.3
>
> May be a reference to httpd-2.x/includes/httpd.h (as suggested by
> Geoff) should be sufficient for users who understand the risk they
> are undertaking.

well yes, the constants are there to abstract the numbers...

but its a PITA to figure out how.

example:
i need to send a 307 redirect

i think: 'wtf is the constant for that?'

i look in the apache docs, i just see constant names

should i use
HTTP_MOVED_TEMPORARILY
HTTP_TEMPORARY_REDIRECT
?

ok, i'm screwed. let me look in the httpd docs

#define HTTP_MOVED_PERMANENTLY 301
#define HTTP_MOVED_TEMPORARILY 302
#define HTTP_SEE_OTHER 303
#define HTTP_NOT_MODIFIED 304
#define HTTP_USE_PROXY 305
#define HTTP_TEMPORARY_REDIRECT 307

ok.. i want a 'HTTP_TEMPORARY_REDIRECT'

i shouldn't need apache source to figure that out

i've been too busy to patch this, but I'll get around to it as soon
as work winds down.

------------

for list archiving, the codes are below

------------

#define HTTP_CONTINUE 100
#define HTTP_SWITCHING_PROTOCOLS 101
#define HTTP_PROCESSING 102
#define HTTP_OK 200
#define HTTP_CREATED 201
#define HTTP_ACCEPTED 202
#define HTTP_NON_AUTHORITATIVE 203
#define HTTP_NO_CONTENT 204
#define HTTP_RESET_CONTENT 205
#define HTTP_PARTIAL_CONTENT 206
#define HTTP_MULTI_STATUS 207
#define HTTP_MULTIPLE_CHOICES 300
#define HTTP_MOVED_PERMANENTLY 301
#define HTTP_MOVED_TEMPORARILY 302
#define HTTP_SEE_OTHER 303
#define HTTP_NOT_MODIFIED 304
#define HTTP_USE_PROXY 305
#define HTTP_TEMPORARY_REDIRECT 307
#define HTTP_BAD_REQUEST 400
#define HTTP_UNAUTHORIZED 401
#define HTTP_PAYMENT_REQUIRED 402
#define HTTP_FORBIDDEN 403
#define HTTP_NOT_FOUND 404
#define HTTP_METHOD_NOT_ALLOWED 405
#define HTTP_NOT_ACCEPTABLE 406
#define HTTP_PROXY_AUTHENTICATION_REQUIRED 407
#define HTTP_REQUEST_TIME_OUT 408
#define HTTP_CONFLICT 409
#define HTTP_GONE 410
#define HTTP_LENGTH_REQUIRED 411
#define HTTP_PRECONDITION_FAILED 412
#define HTTP_REQUEST_ENTITY_TOO_LARGE 413
#define HTTP_REQUEST_URI_TOO_LARGE 414
#define HTTP_UNSUPPORTED_MEDIA_TYPE 415
#define HTTP_RANGE_NOT_SATISFIABLE 416
#define HTTP_EXPECTATION_FAILED 417
#define HTTP_UNPROCESSABLE_ENTITY 422
#define HTTP_LOCKED 423
#define HTTP_FAILED_DEPENDENCY 424
#define HTTP_UPGRADE_REQUIRED 426
#define HTTP_INTERNAL_SERVER_ERROR 500
#define HTTP_NOT_IMPLEMENTED 501
#define HTTP_BAD_GATEWAY 502
#define HTTP_SERVICE_UNAVAILABLE 503
#define HTTP_GATEWAY_TIME_OUT 504
#define HTTP_VERSION_NOT_SUPPORTED 505
#define HTTP_VARIANT_ALSO_VARIES 506
#define HTTP_INSUFFICIENT_STORAGE 507
#define HTTP_NOT_EXTENDED 510




---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


pgollucci at p6m7g8

Aug 28, 2006, 11:04 PM

Post #5 of 22 (13839 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Jonathan wrote:
>
> On Aug 28, 2006, at 8:40 PM, Stas Bekman wrote:
>> constants are precisely there so that one doesn't need to rely on
>> numbers which may change in the future versions of httpd. Granted the
>> HTTP code constants won't change, but the rest could. And mp2/httpd2
>> has hundreds of those constants, compared to a few dozens in mp1/httpd1.3
>>
>> May be a reference to httpd-2.x/includes/httpd.h (as suggested by
>> Geoff) should be sufficient for users who understand the risk they are
>> undertaking.
>
> well yes, the constants are there to abstract the numbers...
>
> but its a PITA to figure out how.
Not that I disagree with the spirit of this, but I don't see how it has anything to do with mod_perl?
The constant values are defined in whatever RFC somewhere and #defines are in the httpd C source.

Why not patch the httpd docs instead ? :)

mod_perl is just pass through anyway, we won't change unless httpd changes underneath us.



--
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci [at] p6m7g8) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ /
/ /|_/ / // /\ \/ /_/ / /__
/_/ /_/\_, /___/\___\_\___/
<___/

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


perrin at elem

Aug 28, 2006, 11:06 PM

Post #6 of 22 (13843 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Jonathan wrote:
> example:
> i need to send a 307 redirect
>
> i think: 'wtf is the constant for that?'
>
> i look in the apache docs, i just see constant names
>
> should i use
> HTTP_MOVED_TEMPORARILY
> HTTP_TEMPORARY_REDIRECT
> ?
>
> ok, i'm screwed. let me look in the httpd docs

No, look at the HTTP RFC. These are official codes with official names.
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

- Perrin

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


fred at taperfriendlymusic

Aug 28, 2006, 11:19 PM

Post #7 of 22 (13823 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

On Tue, 29 Aug 2006, Perrin Harkins wrote:
> Jonathan wrote:
>> example:
>> i need to send a 307 redirect
>> i think: 'wtf is the constant for that?'
>> i look in the apache docs, i just see constant names
>> should i use
>> HTTP_MOVED_TEMPORARILY
>> HTTP_TEMPORARY_REDIRECT
>> ?
>>
>> ok, i'm screwed. let me look in the httpd docs
> No, look at the HTTP RFC. These are official codes with official names.
> http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html

Any objections to adding this as a footnote to the Apache2::Constants
docs?

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


pgollucci at p6m7g8

Aug 28, 2006, 11:47 PM

Post #8 of 22 (13835 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Fred Moyer wrote:
> On Tue, 29 Aug 2006, Perrin Harkins wrote:
>> Jonathan wrote:
>>> example:
>>> i need to send a 307 redirect
>>> i think: 'wtf is the constant for that?'
>>> i look in the apache docs, i just see constant names
>>> should i use
>>> HTTP_MOVED_TEMPORARILY
>>> HTTP_TEMPORARY_REDIRECT
>>> ?
>>>
>>> ok, i'm screwed. let me look in the httpd docs
>> No, look at the HTTP RFC. These are official codes with official names.
>> http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
>
> Any objections to adding this as a footnote to the Apache2::Constants
> docs?
+1
--
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci [at] p6m7g8) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ /
/ /|_/ / // /\ \/ /_/ / /__
/_/ /_/\_, /___/\___\_\___/
<___/

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


perrin at elem

Aug 29, 2006, 9:29 AM

Post #9 of 22 (13846 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

On Mon, 2006-08-28 at 23:19 -0700, Fred Moyer wrote:
> Any objections to adding this as a footnote to the Apache2::Constants
> docs?

Sounds good to me. Thanks.

- Perrin


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


fred at taperfriendlymusic

Aug 29, 2006, 9:38 AM

Post #10 of 22 (13822 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Perrin Harkins wrote:
> On Mon, 2006-08-28 at 23:19 -0700, Fred Moyer wrote:
>> Any objections to adding this as a footnote to the Apache2::Constants
>> docs?
>
> Sounds good to me. Thanks.

I'll apply this diff later today after I poke around the docs a bit and
see if there's another style I should use for the link. This is an
addition to the 'See Also' part of the Apache2::Const manpage.

Index: Const.pod
===================================================================
--- Const.pod (revision 396467)
+++ Const.pod (working copy)
@@ -2583,9 +2583,9 @@

L<mod_perl 2.0 documentation|docs::2.0::index>.

+HTTP RFC official codes with official names
(I<http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html>).


-
=head1 Copyright

mod_perl 2.0 and its core modules are copyrighted under


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


stas at stason

Aug 29, 2006, 10:54 AM

Post #11 of 22 (13828 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Philip M. Gollucci wrote:
> Fred Moyer wrote:
>
>>On Tue, 29 Aug 2006, Perrin Harkins wrote:
>>
>>>Jonathan wrote:
>>>
>>>> example:
>>>> i need to send a 307 redirect
>>>> i think: 'wtf is the constant for that?'
>>>> i look in the apache docs, i just see constant names
>>>> should i use
>>>> HTTP_MOVED_TEMPORARILY
>>>> HTTP_TEMPORARY_REDIRECT
>>>> ?
>>>>
>>>> ok, i'm screwed. let me look in the httpd docs

OK, so you are talking about the HTTP response codes only and not all
constants, which sounds reasonable.

>>>No, look at the HTTP RFC. These are official codes with official names.
>>> http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
>>
>>Any objections to adding this as a footnote to the Apache2::Constants
>>docs?
>
> +1

Either this or a copy of the table from the "practical mod_perl" book
sounds good.

--
_____________________________________________________________
Stas Bekman mailto:stas [at] stason http://stason.org/
MailChannels: Reliable Email Delivery http://mailchannels.com
The "Practical mod_perl" book http://modperlbook.org/
http://www.linkedin.com/in/stasbekman http://perl.apache.org/
http://stason.org/photos/gallery/ [* best photos here *]


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


fred at taperfriendlymusic

Aug 29, 2006, 11:19 AM

Post #12 of 22 (13843 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Hi Stas,

On Tue, 29 Aug 2006, Stas Bekman wrote:
>> > Any objections to adding this as a footnote to the Apache2::Constants
>> > docs?
>>
>> +1
>
> Either this or a copy of the table from the "practical mod_perl" book sounds
> good.

You are referring to these pages I'm guessing?

http://modperlbook.org/html/appf_01.html
http://modperlbook.org/html/appf_02.html

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


stas at stason

Aug 29, 2006, 12:36 PM

Post #13 of 22 (13846 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Fred Moyer wrote:
> Hi Stas,
>
> On Tue, 29 Aug 2006, Stas Bekman wrote:
>
>>> > Any objections to adding this as a footnote to the Apache2::Constants
>>> > docs?
>>>
>>> +1
>>
>>
>> Either this or a copy of the table from the "practical mod_perl" book
>> sounds good.
>
>
> You are referring to these pages I'm guessing?
>
> http://modperlbook.org/html/appf_01.html
> http://modperlbook.org/html/appf_02.html

Yup.

--
_____________________________________________________________
Stas Bekman mailto:stas [at] stason http://stason.org/
MailChannels: Reliable Email Delivery http://mailchannels.com
The "Practical mod_perl" book http://modperlbook.org/
http://www.linkedin.com/in/stasbekman http://perl.apache.org/
http://stason.org/photos/gallery/ [* best photos here *]


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


stas at stason

Aug 29, 2006, 12:38 PM

Post #14 of 22 (13813 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Stas Bekman wrote:
[...]
>> You are referring to these pages I'm guessing?
>>
>> http://modperlbook.org/html/appf_01.html
>> http://modperlbook.org/html/appf_02.html
>
> Yup.

I've attached the POD source.


--
_____________________________________________________________
Stas Bekman mailto:stas [at] stason http://stason.org/
MailChannels: Reliable Email Delivery http://mailchannels.com
The "Practical mod_perl" book http://modperlbook.org/
http://www.linkedin.com/in/stasbekman http://perl.apache.org/
http://stason.org/photos/gallery/ [* best photos here *]
Attachments: http_codes.pod (5.28 KB)


modperl-list at 2xlp

Aug 29, 2006, 4:09 PM

Post #15 of 22 (13825 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

On Aug 29, 2006, at 3:38 PM, Stas Bekman wrote:

> Stas Bekman wrote:
> [...]
>>> You are referring to these pages I'm guessing?
>>>
>>> http://modperlbook.org/html/appf_01.html
>>> http://modperlbook.org/html/appf_02.html
>> Yup.
>

YES!!!

That's exactly what I meant to patch myself.

+1

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


fred at taperfriendlymusic

Aug 29, 2006, 9:49 PM

Post #16 of 22 (13828 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Jonathan Vanasco wrote:
>
> On Aug 29, 2006, at 3:38 PM, Stas Bekman wrote:
>
>> Stas Bekman wrote:
>> [...]
>>>> You are referring to these pages I'm guessing?
>>>>
>>>> http://modperlbook.org/html/appf_01.html
>>>> http://modperlbook.org/html/appf_02.html
>>> Yup.
>>
>
> YES!!!
>
> That's exactly what I meant to patch myself.

If you want to express your vision feel free to submit a diff to this:

http://perl.apache.org/docs/2.0/api/Apache2/Const.pod

I am still figuring out how to lay out everything best here so I'm not
going to rush it, probably have it thought it in a few days but if you
have ideas on how to integrate this info please submit a patch.

>
> +1
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
> For additional commands, e-mail: docs-dev-help [at] perl
>


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


stas at stason

Aug 30, 2006, 10:48 AM

Post #17 of 22 (13825 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Fred Moyer wrote:
> Jonathan Vanasco wrote:
>
>>On Aug 29, 2006, at 3:38 PM, Stas Bekman wrote:
>>
>>
>>>Stas Bekman wrote:
>>>[...]
>>>
>>>>>You are referring to these pages I'm guessing?
>>>>>
>>>>>http://modperlbook.org/html/appf_01.html
>>>>>http://modperlbook.org/html/appf_02.html
>>>>
>>>>Yup.
>>>
>>YES!!!
>>
>>That's exactly what I meant to patch myself.
>
>
> If you want to express your vision feel free to submit a diff to this:
>
> http://perl.apache.org/docs/2.0/api/Apache2/Const.pod
>
> I am still figuring out how to lay out everything best here so I'm not
> going to rush it, probably have it thought it in a few days but if you
> have ideas on how to integrate this info please submit a patch.

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

--
_____________________________________________________________
Stas Bekman mailto:stas [at] stason http://stason.org/
MailChannels: Reliable Email Delivery http://mailchannels.com
The "Practical mod_perl" book http://modperlbook.org/
http://www.linkedin.com/in/stasbekman http://perl.apache.org/
http://stason.org/photos/gallery/ [* best photos here *]


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


fred at taperfriendlymusic

Sep 1, 2006, 11:45 PM

Post #18 of 22 (13814 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

>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: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


pgollucci at p6m7g8

Sep 2, 2006, 12:43 AM

Post #19 of 22 (13801 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Fred Moyer wrote:
>> 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.

a little after this the intentation is off and thus the resulting HTML (text/code) isn't indented correctly.
Should be a trivial fix.
sub unique_id {
require APR::UUID;
return APR::UUID->new->format;
}

I'm not entirely sure, but I think you were trying to have
lines like 'Successful 2xx:' not show up like code -- I think you meant to un-indent them.
(could be wrong here)

Looks fabulous to me.

P.S.
Add yourself to the contributors page and related when you get a chance.

http://perl.apache.org/about/contributors/people.html

(CC'ed fwiles -- I think he needs to do the same)

--
------------------------------------------------------------------------
Philip M. Gollucci (pgollucci [at] p6m7g8) 323.219.4708
Consultant / http://p6m7g8.net/Resume/resume.shtml
Senior Software Engineer - TicketMaster - http://ticketmaster.com
1024D/A79997FA F357 0FDD 2301 6296 690F 6A47 D55A 7172 A799 97F

"In all that I've done wrong I know I must have done something right to
deserve a hug every morning and butterfly kisses at night."
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ /
/ /|_/ / // /\ \/ /_/ / /__
/_/ /_/\_, /___/\___\_\___/
<___/

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


fred at taperfriendlymusic

Sep 2, 2006, 2:02 AM

Post #20 of 22 (13805 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

On Sat, 2 Sep 2006, Philip M. Gollucci wrote:

> Fred Moyer wrote:
>>> 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.
>
> a little after this the intentation is off and thus the resulting HTML (text/code) isn't indented correctly.
> Should be a trivial fix.
> sub unique_id {
> require APR::UUID;
> return APR::UUID->new->format;
> }

I'm cleaning some small stuff up also.
But you know I've running into problems here and there with getting the code
indented properly, I've been trying to do what you have above there and the
fact that I haven't gotten it yet is really bugging me. The pod source I
have is

sub unique_id {
require APR::UUID;
return APR::UUID->new->format;
}

I can't seem to get the second level of indentation needed past the first
verbatim paragraph.

> I'm not entirely sure, but I think you were trying to have
> lines like 'Successful 2xx:' not show up like code -- I think you meant to un-indent them.
> (could be wrong here)

I actually tried that but the results were not what I expected so I just
revised it to this style:

=head2 HTTP 1.1 Status Codes

=over 4

=item *

Informational 1xx:

100...

I'd really like to get figured out how to indent all those code blocks
properly but it looks like that's an issue in several places in the docs
so I'm not sure if it's possible.

> Looks fabulous to me.

Thanks!

> P.S.
> Add yourself to the contributors page and related when you get a chance.
>
> http://perl.apache.org/about/contributors/people.html
>
> (CC'ed fwiles -- I think he needs to do the same)

Will do.

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


frank at wiles

Sep 5, 2006, 8:44 AM

Post #21 of 22 (13789 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

On Sat, 02 Sep 2006 00:43:31 -0700
"Philip M. Gollucci" <pgollucci [at] p6m7g8> wrote:

> P.S.
> Add yourself to the contributors page and related when you get a
> chance.
>
> http://perl.apache.org/about/contributors/people.html
>
> (CC'ed fwiles -- I think he needs to do the same)

Actually I took care of that as my first/test commit.

---------------------------------
Frank Wiles <frank [at] wiles>
http://www.wiles.org
---------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl


stas at stason

Sep 6, 2006, 3:00 PM

Post #22 of 22 (13773 views)
Permalink
Re: status codes in Apache2::Const ? [In reply to]

Fred Moyer wrote:
>> 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?

Not in this case. I think the original comes from the eagle book.

In general we are trying to keep the documents clean from the reference
and originator clutter. References could go to the end of the doc or
something. For acks we have a separate doc.

Thanks for working on this, Fred et al.

--
_____________________________________________________________
Stas Bekman mailto:stas [at] stason http://stason.org/
MailChannels: Reliable Email Delivery http://mailchannels.com
The "Practical mod_perl" book http://modperlbook.org/
http://www.linkedin.com/in/stasbekman http://perl.apache.org/
http://stason.org/photos/gallery/ [* best photos here *]


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-dev-unsubscribe [at] perl
For additional commands, e-mail: docs-dev-help [at] perl

ModPerl docs-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.