Revert the additional changes from net-http-0.3.2

This commit is contained in:
Hiroshi SHIBATA 2022-12-23 19:36:43 +09:00
parent d40064d184
commit eb8d4d7b51
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2

View File

@ -142,13 +142,7 @@ module Net
# #
# The +OK+ response indicates that the server has received # The +OK+ response indicates that the server has received
# a request and has responded successfully. # a request and has responded successfully.
# # See {200 OK}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#200].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#200].
#
class HTTPOK < HTTPSuccess class HTTPOK < HTTPSuccess
HAS_BODY = true HAS_BODY = true
end end
@ -157,13 +151,7 @@ module Net
# #
# The +Created+ response indicates that the server has received # The +Created+ response indicates that the server has received
# and has fulfilled a request to create a new resource. # and has fulfilled a request to create a new resource.
# # See {201 Created}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#201].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-201-created].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#201].
#
class HTTPCreated < HTTPSuccess class HTTPCreated < HTTPSuccess
HAS_BODY = true HAS_BODY = true
end end
@ -172,13 +160,7 @@ module Net
# #
# The +Accepted+ response indicates that the server has received # The +Accepted+ response indicates that the server has received
# and is processing a request, but the processing has not yet been completed. # and is processing a request, but the processing has not yet been completed.
# # See {202 Accepted}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#202].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/202].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-202-accepted].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#202].
#
class HTTPAccepted < HTTPSuccess class HTTPAccepted < HTTPSuccess
HAS_BODY = true HAS_BODY = true
end end
@ -189,13 +171,7 @@ module Net
# is a transforming proxy (such as a Web accelerator) # is a transforming proxy (such as a Web accelerator)
# that received a 200 OK response from its origin, # that received a 200 OK response from its origin,
# and is returning a modified version of the origin's response. # and is returning a modified version of the origin's response.
# # See {203 Non-Authoritative Information}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#203].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/203].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-203-non-authoritative-infor].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#203].
#
class HTTPNonAuthoritativeInformation < HTTPSuccess class HTTPNonAuthoritativeInformation < HTTPSuccess
HAS_BODY = true HAS_BODY = true
end end
@ -204,13 +180,7 @@ module Net
# #
# The <tt>No Content</tt> response indicates that the server # The <tt>No Content</tt> response indicates that the server
# successfully processed the request, and is not returning any content. # successfully processed the request, and is not returning any content.
# # See {204 No Content}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#204].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-204-no-content].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#204].
#
class HTTPNoContent < HTTPSuccess class HTTPNoContent < HTTPSuccess
HAS_BODY = false HAS_BODY = false
end end
@ -220,13 +190,7 @@ module Net
# The <tt>Reset Content</tt> response indicates that the server # The <tt>Reset Content</tt> response indicates that the server
# successfully processed the request, # successfully processed the request,
# asks that the client reset its document view, and is not returning any content. # asks that the client reset its document view, and is not returning any content.
# # See {205 Reset Content}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#205].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/205].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-205-reset-content].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#205].
#
class HTTPResetContent < HTTPSuccess class HTTPResetContent < HTTPSuccess
HAS_BODY = false HAS_BODY = false
end end
@ -236,13 +200,7 @@ module Net
# The <tt>Partial Content</tt> response indicates that the server is delivering # The <tt>Partial Content</tt> response indicates that the server is delivering
# only part of the resource (byte serving) # only part of the resource (byte serving)
# due to a Range header in the request. # due to a Range header in the request.
# # See {206 Partial Content}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#206].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-206-partial-content].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#206].
#
class HTTPPartialContent < HTTPSuccess class HTTPPartialContent < HTTPSuccess
HAS_BODY = true HAS_BODY = true
end end
@ -252,11 +210,7 @@ module Net
# The <tt>Multi-Status (WebDAV)</tt> response indicates that the server # The <tt>Multi-Status (WebDAV)</tt> response indicates that the server
# has received the request, # has received the request,
# and that the message body can contain a number of separate response codes. # and that the message body can contain a number of separate response codes.
# # See {207 Multi-Status (WebDAV)}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#207].
# References:
#
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#207].
#
class HTTPMultiStatus < HTTPSuccess class HTTPMultiStatus < HTTPSuccess
HAS_BODY = true HAS_BODY = true
end end
@ -268,11 +222,7 @@ module Net
# and that the members of a DAV binding have already been enumerated # and that the members of a DAV binding have already been enumerated
# in a preceding part of the (multi-status) response, # in a preceding part of the (multi-status) response,
# and are not being included again. # and are not being included again.
# # See {208 Already Reported (WebDAV)}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#208].
# References:
#
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#208].
#
class HTTPAlreadyReported < HTTPSuccess class HTTPAlreadyReported < HTTPSuccess
HAS_BODY = true HAS_BODY = true
end end
@ -282,11 +232,7 @@ module Net
# The <tt>IM Used</tt> response indicates that the server has fulfilled a request # The <tt>IM Used</tt> response indicates that the server has fulfilled a request
# for the resource, and the response is a representation of the result # for the resource, and the response is a representation of the result
# of one or more instance-manipulations applied to the current instance. # of one or more instance-manipulations applied to the current instance.
# # See {226 IM Used}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#226].
# References:
#
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#226].
#
class HTTPIMUsed < HTTPSuccess class HTTPIMUsed < HTTPSuccess
HAS_BODY = true HAS_BODY = true
end end
@ -295,13 +241,7 @@ module Net
# #
# The <tt>Multiple Choices</tt> response indicates that the server # The <tt>Multiple Choices</tt> response indicates that the server
# offers multiple options for the resource from which the client may choose. # offers multiple options for the resource from which the client may choose.
# # See {300 Multiple Choices}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#300].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/300].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-300-multiple-choices].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#300].
#
class HTTPMultipleChoices < HTTPRedirection class HTTPMultipleChoices < HTTPRedirection
HAS_BODY = true HAS_BODY = true
end end
@ -311,13 +251,7 @@ module Net
# #
# The <tt>Moved Permanently</tt> response indicates that links or records # The <tt>Moved Permanently</tt> response indicates that links or records
# returning this response should be updated to use the given URL. # returning this response should be updated to use the given URL.
# # See {301 Moved Permanently}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#301].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/301].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-301-moved-permanently].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#301].
#
class HTTPMovedPermanently < HTTPRedirection class HTTPMovedPermanently < HTTPRedirection
HAS_BODY = true HAS_BODY = true
end end
@ -326,13 +260,7 @@ module Net
# #
# The <tt>Found</tt> response indicates that the client # The <tt>Found</tt> response indicates that the client
# should look at (browse to) another URL. # should look at (browse to) another URL.
# # See {302 Found}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#302].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-302-found].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#302].
#
class HTTPFound < HTTPRedirection class HTTPFound < HTTPRedirection
HAS_BODY = true HAS_BODY = true
end end
@ -341,13 +269,7 @@ module Net
# Response class for <tt>See Other</tt> responses (status code 303). # Response class for <tt>See Other</tt> responses (status code 303).
# #
# The response to the request can be found under another URI using the GET method. # The response to the request can be found under another URI using the GET method.
# # See {303 See Other}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#303].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/303].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-303-see-other].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#303].
#
class HTTPSeeOther < HTTPRedirection class HTTPSeeOther < HTTPRedirection
HAS_BODY = true HAS_BODY = true
end end
@ -356,13 +278,7 @@ module Net
# #
# Indicates that the resource has not been modified since the version # Indicates that the resource has not been modified since the version
# specified by the request headers. # specified by the request headers.
# # See {304 Not Modified}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#304].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-304-not-modified].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#304].
#
class HTTPNotModified < HTTPRedirection class HTTPNotModified < HTTPRedirection
HAS_BODY = false HAS_BODY = false
end end
@ -371,12 +287,7 @@ module Net
# #
# The requested resource is available only through a proxy, # The requested resource is available only through a proxy,
# whose address is provided in the response. # whose address is provided in the response.
# # See {305 Use Proxy}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#305].
# References:
#
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-305-use-proxy].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#305].
#
class HTTPUseProxy < HTTPRedirection class HTTPUseProxy < HTTPRedirection
HAS_BODY = false HAS_BODY = false
end end
@ -385,13 +296,7 @@ module Net
# #
# The request should be repeated with another URI; # The request should be repeated with another URI;
# however, future requests should still use the original URI. # however, future requests should still use the original URI.
# # See {307 Temporary Redirect}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#307].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-307-temporary-redirect].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#307].
#
class HTTPTemporaryRedirect < HTTPRedirection class HTTPTemporaryRedirect < HTTPRedirection
HAS_BODY = true HAS_BODY = true
end end
@ -399,13 +304,7 @@ module Net
# Response class for <tt>Permanent Redirect</tt> responses (status code 308). # Response class for <tt>Permanent Redirect</tt> responses (status code 308).
# #
# This and all future requests should be directed to the given URI. # This and all future requests should be directed to the given URI.
# # See {308 Permanent Redirect}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#308].
# References:
#
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308].
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-308-permanent-redirect].
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#308].
#
class HTTPPermanentRedirect < HTTPRedirection class HTTPPermanentRedirect < HTTPRedirection
HAS_BODY = true HAS_BODY = true
end end