diff options
author | Hiroshi SHIBATA <[email protected]> | 2022-12-23 19:36:43 +0900 |
---|---|---|
committer | Hiroshi SHIBATA <[email protected]> | 2022-12-23 19:36:43 +0900 |
commit | eb8d4d7b5145849325985c00b810b8d75661d86e (patch) | |
tree | 6059d40b4c45bb161c35edf10875c888b6b94a4b /lib/net/http | |
parent | d40064d1846b5835dff81e3f168c0c3a6c85e814 (diff) |
Revert the additional changes from net-http-0.3.2
Diffstat (limited to 'lib/net/http')
-rw-r--r-- | lib/net/http/responses.rb | 137 |
1 files changed, 18 insertions, 119 deletions
diff --git a/lib/net/http/responses.rb b/lib/net/http/responses.rb index b9071ca62f..b2dad10537 100644 --- a/lib/net/http/responses.rb +++ b/lib/net/http/responses.rb @@ -142,13 +142,7 @@ module Net # # The +OK+ response indicates that the server has received # a request and has responded successfully. - # - # 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]. - # + # See {200 OK}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#200]. class HTTPOK < HTTPSuccess HAS_BODY = true end @@ -157,13 +151,7 @@ module Net # # The +Created+ response indicates that the server has received # and has fulfilled a request to create a new resource. - # - # 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]. - # + # See {201 Created}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#201]. class HTTPCreated < HTTPSuccess HAS_BODY = true end @@ -172,13 +160,7 @@ module Net # # The +Accepted+ response indicates that the server has received # and is processing a request, but the processing has not yet been completed. - # - # 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]. - # + # See {202 Accepted}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#202]. class HTTPAccepted < HTTPSuccess HAS_BODY = true end @@ -189,13 +171,7 @@ module Net # is a transforming proxy (such as a Web accelerator) # that received a 200 OK response from its origin, # and is returning a modified version of the origin's response. - # - # 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]. - # + # See {203 Non-Authoritative Information}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#203]. class HTTPNonAuthoritativeInformation < HTTPSuccess HAS_BODY = true end @@ -204,13 +180,7 @@ module Net # # The <tt>No Content</tt> response indicates that the server # successfully processed the request, and is not returning any content. - # - # 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]. - # + # See {204 No Content}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#204]. class HTTPNoContent < HTTPSuccess HAS_BODY = false end @@ -220,13 +190,7 @@ module Net # The <tt>Reset Content</tt> response indicates that the server # successfully processed the request, # asks that the client reset its document view, and is not returning any content. - # - # 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]. - # + # See {205 Reset Content}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#205]. class HTTPResetContent < HTTPSuccess HAS_BODY = false end @@ -236,13 +200,7 @@ module Net # The <tt>Partial Content</tt> response indicates that the server is delivering # only part of the resource (byte serving) # due to a Range header in the request. - # - # 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]. - # + # See {206 Partial Content}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#206]. class HTTPPartialContent < HTTPSuccess HAS_BODY = true end @@ -252,11 +210,7 @@ module Net # The <tt>Multi-Status (WebDAV)</tt> response indicates that the server # has received the request, # and that the message body can contain a number of separate response codes. - # - # References: - # - # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#207]. - # + # See {207 Multi-Status (WebDAV)}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#207]. class HTTPMultiStatus < HTTPSuccess HAS_BODY = true end @@ -268,11 +222,7 @@ module Net # and that the members of a DAV binding have already been enumerated # in a preceding part of the (multi-status) response, # and are not being included again. - # - # References: - # - # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#208]. - # + # See {208 Already Reported (WebDAV)}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#208]. class HTTPAlreadyReported < HTTPSuccess HAS_BODY = true end @@ -282,11 +232,7 @@ module Net # 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 # of one or more instance-manipulations applied to the current instance. - # - # References: - # - # - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#226]. - # + # See {226 IM Used}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#226]. class HTTPIMUsed < HTTPSuccess HAS_BODY = true end @@ -295,13 +241,7 @@ module Net # # The <tt>Multiple Choices</tt> response indicates that the server # offers multiple options for the resource from which the client may choose. - # - # 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]. - # + # See {300 Multiple Choices}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#300]. class HTTPMultipleChoices < HTTPRedirection HAS_BODY = true end @@ -311,13 +251,7 @@ module Net # # The <tt>Moved Permanently</tt> response indicates that links or records # returning this response should be updated to use the given URL. - # - # 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]. - # + # See {301 Moved Permanently}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#301]. class HTTPMovedPermanently < HTTPRedirection HAS_BODY = true end @@ -326,13 +260,7 @@ module Net # # The <tt>Found</tt> response indicates that the client # should look at (browse to) another URL. - # - # 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]. - # + # See {302 Found}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#302]. class HTTPFound < HTTPRedirection HAS_BODY = true end @@ -341,13 +269,7 @@ module Net # 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. - # - # 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]. - # + # See {303 See Other}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#303]. class HTTPSeeOther < HTTPRedirection HAS_BODY = true end @@ -356,13 +278,7 @@ module Net # # Indicates that the resource has not been modified since the version # specified by the request headers. - # - # 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]. - # + # See {304 Not Modified}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#304]. class HTTPNotModified < HTTPRedirection HAS_BODY = false end @@ -371,12 +287,7 @@ module Net # # The requested resource is available only through a proxy, # whose address is provided in the response. - # - # 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]. - # + # See {305 Use Proxy}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#305]. class HTTPUseProxy < HTTPRedirection HAS_BODY = false end @@ -385,13 +296,7 @@ module Net # # The request should be repeated with another URI; # however, future requests should still use the original URI. - # - # 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]. - # + # See {307 Temporary Redirect}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#307]. class HTTPTemporaryRedirect < HTTPRedirection HAS_BODY = true end @@ -399,13 +304,7 @@ module Net # Response class for <tt>Permanent Redirect</tt> responses (status code 308). # # This and all future requests should be directed to the given URI. - # - # 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]. - # + # See {308 Permanent Redirect}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#308]. class HTTPPermanentRedirect < HTTPRedirection HAS_BODY = true end |