Hi, Matz and rubyists.
I attach a patch that contains additional HTTP status codes from RFC 6585 -
http://tools.ietf.org/html/rfc6585.

* lib/net/http.rb : add HTTP status codes from RFC 6585.
* lib/webrick/httpstatus.rb : add HTTP status codes from RFC 6585.

It's simple, isn't it?
Thanks.
-- 
----------------------------------------
Sangil Jung.

+82.10.6402-4639
http://humbroll.com





Index: lib/webrick/httpstatus.rb
===================================================================
--- lib/webrick/httpstatus.rb (revision 35666)
+++ lib/webrick/httpstatus.rb (working copy)
@@ -88,12 +88,16 @@
       415 => 'Unsupported Media Type',
       416 => 'Request Range Not Satisfiable',
       417 => 'Expectation Failed',
+      428 => 'Precondition Required',
+      429 => 'Too Many Requests',
+      431 => 'Request Header Fields Too Large',
       500 => 'Internal Server Error',
       501 => 'Not Implemented',
       502 => 'Bad Gateway',
       503 => 'Service Unavailable',
       504 => 'Gateway Timeout',
-      505 => 'HTTP Version Not Supported'
+      505 => 'HTTP Version Not Supported',
+      511 => 'Network Authentication Required'
     }

     # Maps a status code to the corresponding Status class
Index: lib/net/http.rb
===================================================================
--- lib/net/http.rb (revision 35666)
+++ lib/net/http.rb (working copy)
@@ -347,6 +347,9 @@
   #   HTTPUnsupportedMediaType::            415
   #   HTTPRequestedRangeNotSatisfiable::    416
   #   HTTPExpectationFailed::               417
+  #   HTTPPreconditionRequired::            428
+  #   HTTPTooManyRequests::                 429
+  #   HTTPRequestHeaderFieldsTooLarge::     431
   # HTTPServerError::                    5xx
   #   HTTPInternalServerError::             500
   #   HTTPNotImplemented::                  501
@@ -354,6 +357,7 @@
   #   HTTPServiceUnavailable::              503
   #   HTTPGatewayTimeOut::                  504
   #   HTTPVersionNotSupported::             505
+  #   HTTPNetworkAuthenticationRequired::   511
   #
   # There is also the Net::HTTPBadResponse exception which is raised when
   # there is a protocol error.
@@ -2387,6 +2391,9 @@
   #       415        HTTPUnsupportedMediaType
   #       416        HTTPRequestedRangeNotSatisfiable
   #       417        HTTPExpectationFailed
+  #       428        HTTPPreconditionRequired
+  #       429        HTTPTooManyRequests
+  #       431        HTTPRequestHeaderFieldsTooLarge
   #
   #     5xx        HTTPServerError
   #       500        HTTPInternalServerError
@@ -2395,6 +2402,7 @@
   #       503        HTTPServiceUnavailable
   #       504        HTTPGatewayTimeOut
   #       505        HTTPVersionNotSupported
+  #       511        HTTPNetworkAuthenticationRequired
   #
   #     xxx        HTTPUnknownResponse
   #
@@ -2544,25 +2552,37 @@
   class HTTPExpectationFailed < HTTPClientError             # 417
     HAS_BODY = true
   end
+  class HTTPPreconditionRequired < HTTPClientError          # 428
+    HAS_BODY = true
+  end
+  class HTTPTooManyRequests < HTTPClientError               # 429
+    HAS_BODY = true
+  end
+  class HTTPRequestHeaderFieldsTooLarge < HTTPClientError   # 431
+    HAS_BODY = true
+  end

-  class HTTPInternalServerError < HTTPServerError   # 500
+  class HTTPInternalServerError < HTTPServerError           # 500
     HAS_BODY = true
   end
-  class HTTPNotImplemented < HTTPServerError        # 501
+  class HTTPNotImplemented < HTTPServerError                # 501
     HAS_BODY = true
   end
-  class HTTPBadGateway < HTTPServerError            # 502
+  class HTTPBadGateway < HTTPServerError                    # 502
     HAS_BODY = true
   end
-  class HTTPServiceUnavailable < HTTPServerError    # 503
+  class HTTPServiceUnavailable < HTTPServerError            # 503
     HAS_BODY = true
   end
-  class HTTPGatewayTimeOut < HTTPServerError        # 504
+  class HTTPGatewayTimeOut < HTTPServerError                # 504
     HAS_BODY = true
   end
-  class HTTPVersionNotSupported < HTTPServerError   # 505
+  class HTTPVersionNotSupported < HTTPServerError           # 505
     HAS_BODY = true
   end
+  class HTTPNetworkAuthenticationRequired < HTTPServerError # 511
+    HAS_BODY = true
+  end

   # :startdoc:

@@ -2614,13 +2634,17 @@
       '415' => HTTPUnsupportedMediaType,
       '416' => HTTPRequestedRangeNotSatisfiable,
       '417' => HTTPExpectationFailed,
+      '428' => HTTPPreconditionRequired,
+      '429' => HTTPTooManyRequests,
+      '431' => HTTPRequestHeaderFieldsTooLarge,

       '500' => HTTPInternalServerError,
       '501' => HTTPNotImplemented,
       '502' => HTTPBadGateway,
       '503' => HTTPServiceUnavailable,
       '504' => HTTPGatewayTimeOut,
-      '505' => HTTPVersionNotSupported
+      '505' => HTTPVersionNotSupported,
+      '511' => HTTPNetworkAuthenticationRequired
     }

     class << HTTPResponse






-- 
----------------------------------------
Sangil Jung.

+82.10.6402-4639
http://humbroll.com
(supressed text/html)SW5kZXg6IGxpYi93ZWJyaWNrL2h0dHBzdGF0dXMucmIKPT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PQotLS0gbGliL3dlYnJp
Y2svaHR0cHN0YXR1cy5yYgkocmV2aXNpb24gMzU2NjYpCisrKyBsaWIvd2Vicmljay9odHRwc3Rh
dHVzLnJiCSh3b3JraW5nIGNvcHkpCkBAIC04OCwxMiArODgsMTYgQEAKICAgICAgIDQxNSA9PiAn
VW5zdXBwb3J0ZWQgTWVkaWEgVHlwZScsCiAgICAgICA0MTYgPT4gJ1JlcXVlc3QgUmFuZ2UgTm90
IFNhdGlzZmlhYmxlJywKICAgICAgIDQxNyA9PiAnRXhwZWN0YXRpb24gRmFpbGVkJywKKyAgICAg
IDQyOCA9PiAnUHJlY29uZGl0aW9uIFJlcXVpcmVkJywKKyAgICAgIDQyOSA9PiAnVG9vIE1hbnkg
UmVxdWVzdHMnLAorICAgICAgNDMxID0+ICdSZXF1ZXN0IEhlYWRlciBGaWVsZHMgVG9vIExhcmdl
JywKICAgICAgIDUwMCA9PiAnSW50ZXJuYWwgU2VydmVyIEVycm9yJywKICAgICAgIDUwMSA9PiAn
Tm90IEltcGxlbWVudGVkJywKICAgICAgIDUwMiA9PiAnQmFkIEdhdGV3YXknLAogICAgICAgNTAz
ID0+ICdTZXJ2aWNlIFVuYXZhaWxhYmxlJywKICAgICAgIDUwNCA9PiAnR2F0ZXdheSBUaW1lb3V0
JywKLSAgICAgIDUwNSA9PiAnSFRUUCBWZXJzaW9uIE5vd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