Skip Menu |

This queue is for tickets about the libwww-perl CPAN distribution.

Report information
The Basics
Id: 29619
Status: resolved
Priority: 0/
Queue: libwww-perl

People
Owner: Nobody in particular
Requestors: MARKOV [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 5.808
Fixed in: (no value)



Subject: HTTP::Status misses a few
Page http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html lists HTTP status codes. The following are missing from HTTP::Status: 425 No code 426 Upgrade Required 506 Variant Also Negotiates 510 Not Extended Please can you add them?
On Wed Sep 26 02:19:52 2007, MARKOV wrote: Show quoted text
> Page > http://www.askapache.com/htaccess/apache-status-code-headers- > errordocument.html > lists HTTP status codes. The following are missing from HTTP::Status: > > 425 No code > 426 Upgrade Required > 506 Variant Also Negotiates > 510 Not Extended > > Please can you add them?
I certainly could, but it would be nice to have some reference to where their meaning is defined. Do you know?
Subject: Re: [rt.cpan.org #29619] HTTP::Status misses a few
Date: Mon, 7 Apr 2008 13:45:00 +0200
To: Gisle_Aas via RT <bug-libwww-perl [...] rt.cpan.org>
From: Mark Overmeer <mark [...] overmeer.net>
* Gisle_Aas via RT (bug-libwww-perl@rt.cpan.org) [080407 10:24]: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=29619 > > > On Wed Sep 26 02:19:52 2007, MARKOV wrote:
> > Page > > http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html > > lists HTTP status codes. The following are missing from HTTP::Status:
> I certainly could, but it would be nice to have some reference to where > their meaning is defined. Do you know?
That Apache defines them should be enough prove that they are being used. Wikipedia has a good list http://en.wikipedia.org/wiki/List_of_HTTP_status_codes Show quoted text
> > 425 No code
Wikipedia says "425 Unordered collection", WebDAV RFC3648 Show quoted text
> > 426 Upgrade Required
Wikipedia RFC2817 Show quoted text
> > 506 Variant Also Negotiates
Wikipedia tells me it is from RFC2295 Show quoted text
> > 510 Not Extended
Wikipedia says it is from RFC2774 Used in MS SOAP extension framework http://www.w3.org/Protocols/HTTP/ietf-http-ext/Scenarios.html There may be more codes missing... I used Apache's list for this report, not wikipedia. -- Regards, MarkOv ------------------------------------------------------------------------ Mark Overmeer MSc MARKOV Solutions Mark@Overmeer.net solutions@overmeer.net http://Mark.Overmeer.net http://solutions.overmeer.net
I've added those codes now: commit bffaf18cab3f10348ab2972a72cba553ec429455 Author: Gisle Aas <gisle@aas.no> Date: Mon Apr 7 22:26:19 2008 +0200 Complement the HTTP::Status codes [RT#29619] diff --git a/lib/HTTP/Status.pm b/lib/HTTP/Status.pm index d1c224a..44b9594 100644 --- a/lib/HTTP/Status.pm +++ b/lib/HTTP/Status.pm @@ -13,10 +13,13 @@ $VERSION = "5.810"; # Note also addition of mnemonics to @EXPORT below +# Unmarked codes are from RFC 2616 +# See also: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes + my %StatusCode = ( 100 => 'Continue', 101 => 'Switching Protocols', - 102 => 'Processing', # WebDAV + 102 => 'Processing', # RFC 2518 (WebDAV) 200 => 'OK', 201 => 'Created', 202 => 'Accepted', @@ -24,7 +27,7 @@ my %StatusCode = ( 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content', - 207 => 'Multi-Status', # WebDAV + 207 => 'Multi-Status', # RFC 2518 (WebDAV) 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', @@ -50,16 +53,22 @@ my %StatusCode = ( 415 => 'Unsupported Media Type', 416 => 'Request Range Not Satisfiable', 417 => 'Expectation Failed', - 422 => 'Unprocessable Entity', # WebDAV - 423 => 'Locked', # WebDAV - 424 => 'Failed Dependency', # WebDAV + 422 => 'Unprocessable Entity', # RFC 2518 (WebDAV) + 423 => 'Locked', # RFC 2518 (WebDAV) + 424 => 'Failed Dependency', # RFC 2518 (WebDAV) + 425 => 'No code', # WebDAV Advanced Collections + 426 => 'Upgrade Required', # RFC 2817 + 449 => 'Retry with', # unofficial Microsoft 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Timeout', 505 => 'HTTP Version Not Supported', - 507 => 'Insufficient Storage', # WebDAV + 506 => 'Variant Also Negotiates', # RFC 2295 + 507 => 'Insufficient Storage', # RFC 2518 (WebDAV) + 509 => 'Bandwidth Limit Exceeded', # unofficial + 510 => 'Not Extended', # RFC 2774 ); my $mnemonicCode = ''; @@ -164,6 +173,9 @@ names: RC_UNPROCESSABLE_ENTITY (422) RC_LOCKED (423) RC_FAILED_DEPENDENCY (424) + RC_NO_CODE (425) + RC_UPGRADE_REQUIRED (426) + RC_RETRY_WITH (449) RC_INTERNAL_SERVER_ERROR (500) RC_NOT_IMPLEMENTED (501) @@ -171,7 +183,10 @@ names: RC_SERVICE_UNAVAILABLE (503) RC_GATEWAY_TIMEOUT (504) RC_HTTP_VERSION_NOT_SUPPORTED (505) + RC_VARIANT_ALSO_NEGOTIATES (506) RC_INSUFFICIENT_STORAGE (507) + RC_BANDWIDTH_LIMIT_EXCEEDED (509) + RC_NOT_EXTENDED (510) =head1 FUNCTIONS