ruby-changes:41315
From: hsbt <ko1@a...>
Date: Wed, 30 Dec 2015 20:53:22 +0900 (JST)
Subject: [ruby-changes:41315] hsbt:r53387 (trunk): * lib/net/http/responses.rb: Added new response class for 451 status code.
hsbt 2015-12-30 20:53:15 +0900 (Wed, 30 Dec 2015) New Revision: 53387 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=53387 Log: * lib/net/http/responses.rb: Added new response class for 451 status code. * lib/net/http.rb: documentation for HTTPUnavailableForLegalReasons Modified files: trunk/ChangeLog trunk/lib/net/http/responses.rb trunk/lib/net/http.rb Index: ChangeLog =================================================================== --- ChangeLog (revision 53386) +++ ChangeLog (revision 53387) @@ -1,3 +1,8 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Dec 30 20:53:09 2015 SHIBATA Hiroshi <hsbt@r...> + + * lib/net/http/responses.rb: Added new response class for 451 status code. + * lib/net/http.rb: documentation for HTTPUnavailableForLegalReasons + Wed Dec 30 20:45:45 2015 SHIBATA Hiroshi <hsbt@r...> * lib/webrick/httpstatus.rb: Added HTTP 451 Status Code. Index: lib/net/http/responses.rb =================================================================== --- lib/net/http/responses.rb (revision 53386) +++ lib/net/http/responses.rb (revision 53387) @@ -169,6 +169,9 @@ end https://github.com/ruby/ruby/blob/trunk/lib/net/http/responses.rb#L169 class Net::HTTPRequestHeaderFieldsTooLarge < Net::HTTPClientError # 431 - RFC 6585 HAS_BODY = true end +class Net::HTTPUnavailableForLegalReasons < Net::HTTPClientError # 451 + HAS_BODY = true +end # 444 No Response - Nginx # 449 Retry With - Microsoft # 450 Blocked by Windows Parental Controls - Microsoft Index: lib/net/http.rb =================================================================== --- lib/net/http.rb (revision 53386) +++ lib/net/http.rb (revision 53387) @@ -370,6 +370,7 @@ module Net #:nodoc: https://github.com/ruby/ruby/blob/trunk/lib/net/http.rb#L370 # HTTPPreconditionRequired:: 428 # HTTPTooManyRequests:: 429 # HTTPRequestHeaderFieldsTooLarge:: 431 + # HTTPUnavailableForLegalReasons:: 451 # HTTPServerError:: 5xx # HTTPInternalServerError:: 500 # HTTPNotImplemented:: 501 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/