aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--lib/net/http.rb1
-rw-r--r--lib/net/http/responses.rb3
3 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 7a4bc80f37..15ff95b585 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Wed Dec 30 20:53:09 2015 SHIBATA Hiroshi <hsbt@ruby-lang.org>
+
+ * 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@ruby-lang.org>
* lib/webrick/httpstatus.rb: Added HTTP 451 Status Code.
diff --git a/lib/net/http.rb b/lib/net/http.rb
index bc01b29bff..f77df5efa3 100644
--- a/lib/net/http.rb
+++ b/lib/net/http.rb
@@ -370,6 +370,7 @@ module Net #:nodoc:
# HTTPPreconditionRequired:: 428
# HTTPTooManyRequests:: 429
# HTTPRequestHeaderFieldsTooLarge:: 431
+ # HTTPUnavailableForLegalReasons:: 451
# HTTPServerError:: 5xx
# HTTPInternalServerError:: 500
# HTTPNotImplemented:: 501
diff --git a/lib/net/http/responses.rb b/lib/net/http/responses.rb
index a5b8ddc68b..8e75f75d4f 100644
--- a/lib/net/http/responses.rb
+++ b/lib/net/http/responses.rb
@@ -169,6 +169,9 @@ end
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