From a9e8b77697642e0be72af2a3198ddd025c2b31f3 Mon Sep 17 00:00:00 2001 From: knu Date: Sun, 10 Jun 2012 09:59:59 +0000 Subject: * lib/net/http/response.rb: Remove a duplicated rdoc and leave a pointer. * lib/net/http/responses.rb: Add RFC numbers to base on. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36017 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- lib/net/http/response.rb | 61 ++--------------------------------------------- lib/net/http/responses.rb | 21 ++++++++-------- 2 files changed, 12 insertions(+), 70 deletions(-) (limited to 'lib/net') diff --git a/lib/net/http/response.rb b/lib/net/http/response.rb index a5c30a87d6..dde5ae308e 100644 --- a/lib/net/http/response.rb +++ b/lib/net/http/response.rb @@ -9,66 +9,9 @@ # Note that each possible HTTP response code defines its own # HTTPResponse subclass. These are listed below. # -# All classes are -# defined under the Net module. Indentation indicates inheritance. +# All classes are defined under the Net module. Indentation indicates +# inheritance. For a list of the classes see Net::HTTP. # -# xxx HTTPResponse -# -# 1xx HTTPInformation -# 100 HTTPContinue -# 101 HTTPSwitchProtocol -# -# 2xx HTTPSuccess -# 200 HTTPOK -# 201 HTTPCreated -# 202 HTTPAccepted -# 203 HTTPNonAuthoritativeInformation -# 204 HTTPNoContent -# 205 HTTPResetContent -# 206 HTTPPartialContent -# -# 3xx HTTPRedirection -# 300 HTTPMultipleChoice -# 301 HTTPMovedPermanently -# 302 HTTPFound -# 303 HTTPSeeOther -# 304 HTTPNotModified -# 305 HTTPUseProxy -# 307 HTTPTemporaryRedirect -# -# 4xx HTTPClientError -# 400 HTTPBadRequest -# 401 HTTPUnauthorized -# 402 HTTPPaymentRequired -# 403 HTTPForbidden -# 404 HTTPNotFound -# 405 HTTPMethodNotAllowed -# 406 HTTPNotAcceptable -# 407 HTTPProxyAuthenticationRequired -# 408 HTTPRequestTimeOut -# 409 HTTPConflict -# 410 HTTPGone -# 411 HTTPLengthRequired -# 412 HTTPPreconditionFailed -# 413 HTTPRequestEntityTooLarge -# 414 HTTPRequestURITooLong -# 415 HTTPUnsupportedMediaType -# 416 HTTPRequestedRangeNotSatisfiable -# 417 HTTPExpectationFailed -# 428 HTTPPreconditionRequired -# 429 HTTPTooManyRequests -# 431 HTTPRequestHeaderFieldsTooLarge -# -# 5xx HTTPServerError -# 500 HTTPInternalServerError -# 501 HTTPNotImplemented -# 502 HTTPBadGateway -# 503 HTTPServiceUnavailable -# 504 HTTPGatewayTimeOut -# 505 HTTPVersionNotSupported -# 511 HTTPNetworkAuthenticationRequired -# -# xxx HTTPUnknownResponse # class Net::HTTPResponse class << self diff --git a/lib/net/http/responses.rb b/lib/net/http/responses.rb index d17a452e7f..43494caaf1 100644 --- a/lib/net/http/responses.rb +++ b/lib/net/http/responses.rb @@ -116,16 +116,6 @@ end class Net::HTTPPreconditionFailed < Net::HTTPClientError # 412 HAS_BODY = true end -class Net::HTTPPreconditionRequired < Net::HTTPClientError # 428 - HAS_BODY = true -end -class Net::HTTPTooManyRequests < Net::HTTPClientError # 429 - HAS_BODY = true -end -class Net::HTTPRequestHeaderFieldsTooLarge < Net::HTTPClientError # 431 - HAS_BODY = true -end - class Net::HTTPRequestEntityTooLarge < Net::HTTPClientError # 413 HAS_BODY = true end @@ -142,6 +132,15 @@ end class Net::HTTPExpectationFailed < Net::HTTPClientError # 417 HAS_BODY = true end +class Net::HTTPPreconditionRequired < Net::HTTPClientError # 428 - RFC 6585 + HAS_BODY = true +end +class Net::HTTPTooManyRequests < Net::HTTPClientError # 429 - RFC 6585 + HAS_BODY = true +end +class Net::HTTPRequestHeaderFieldsTooLarge < Net::HTTPClientError # 431 - RFC 6585 + HAS_BODY = true +end class Net::HTTPInternalServerError < Net::HTTPServerError # 500 HAS_BODY = true @@ -161,7 +160,7 @@ end class Net::HTTPVersionNotSupported < Net::HTTPServerError # 505 HAS_BODY = true end -class Net::HTTPNetworkAuthenticationRequired < Net::HTTPServerError # 511 +class Net::HTTPNetworkAuthenticationRequired < Net::HTTPServerError # 511 - RFC 6585 HAS_BODY = true end -- cgit v1.2.3