Skip to content

Commit 7681151

Browse files
[DOC] Adding links to references (#97)
1 parent bebaa97 commit 7681151

File tree

1 file changed

+72
-11
lines changed

1 file changed

+72
-11
lines changed

lib/net/http/responses.rb

Lines changed: 72 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,13 @@ class HTTPUnavailableForLegalReasons < HTTPClientError
807807
# Response class for <tt>Internal Server Error</tt> responses (status code 500).
808808
#
809809
# An unexpected condition was encountered and no more specific message is suitable.
810-
# See {500 Internal Server Error}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#500].
810+
#
811+
# References:
812+
#
813+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500].
814+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-500-internal-server-error].
815+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#500].
816+
#
811817
class HTTPInternalServerError < HTTPServerError
812818
HAS_BODY = true
813819
end
@@ -816,7 +822,13 @@ class HTTPInternalServerError < HTTPServerError
816822
#
817823
# The server either does not recognize the request method,
818824
# or it lacks the ability to fulfil the request.
819-
# See {501 Not Implemented}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#501].
825+
#
826+
# References:
827+
#
828+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/501].
829+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-501-not-implemented].
830+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#501].
831+
#
820832
class HTTPNotImplemented < HTTPServerError
821833
HAS_BODY = true
822834
end
@@ -825,7 +837,13 @@ class HTTPNotImplemented < HTTPServerError
825837
#
826838
# The server was acting as a gateway or proxy
827839
# and received an invalid response from the upstream server.
828-
# See {502 Bad Gateway}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#502].
840+
#
841+
# References:
842+
#
843+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502].
844+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-502-bad-gateway].
845+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#502].
846+
#
829847
class HTTPBadGateway < HTTPServerError
830848
HAS_BODY = true
831849
end
@@ -834,7 +852,13 @@ class HTTPBadGateway < HTTPServerError
834852
#
835853
# The server cannot handle the request
836854
# (because it is overloaded or down for maintenance).
837-
# See {503 Service Unavailable}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#503].
855+
#
856+
# References:
857+
#
858+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503].
859+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable].
860+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#503].
861+
#
838862
class HTTPServiceUnavailable < HTTPServerError
839863
HAS_BODY = true
840864
end
@@ -843,7 +867,13 @@ class HTTPServiceUnavailable < HTTPServerError
843867
#
844868
# The server was acting as a gateway or proxy
845869
# and did not receive a timely response from the upstream server.
846-
# See {504 Gateway Timeout}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#504].
870+
#
871+
# References:
872+
#
873+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504].
874+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-504-gateway-timeout].
875+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#504].
876+
#
847877
class HTTPGatewayTimeout < HTTPServerError
848878
HAS_BODY = true
849879
end
@@ -852,31 +882,52 @@ class HTTPGatewayTimeout < HTTPServerError
852882
# Response class for <tt>HTTP Version Not Supported</tt> responses (status code 505).
853883
#
854884
# The server does not support the HTTP version used in the request.
855-
# See {505 HTTP Version Not Supported}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#505].
885+
#
886+
# References:
887+
#
888+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/505].
889+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-505-http-version-not-suppor].
890+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#505].
891+
#
856892
class HTTPVersionNotSupported < HTTPServerError
857893
HAS_BODY = true
858894
end
859895

860896
# Response class for <tt>Variant Also Negotiates</tt> responses (status code 506).
861897
#
862898
# Transparent content negotiation for the request results in a circular reference.
863-
# See {506 Variant Also Negotiates}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#506].
899+
#
900+
# References:
901+
#
902+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/506].
903+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#506].
904+
#
864905
class HTTPVariantAlsoNegotiates < HTTPServerError
865906
HAS_BODY = true
866907
end
867908

868909
# Response class for <tt>Insufficient Storage (WebDAV)</tt> responses (status code 507).
869910
#
870911
# The server is unable to store the representation needed to complete the request.
871-
# See {507 Insufficient Storage (WebDAV)}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#507].
912+
#
913+
# References:
914+
#
915+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/507].
916+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#507].
917+
#
872918
class HTTPInsufficientStorage < HTTPServerError
873919
HAS_BODY = true
874920
end
875921

876922
# Response class for <tt>Loop Detected (WebDAV)</tt> responses (status code 508).
877923
#
878924
# The server detected an infinite loop while processing the request.
879-
# See {508 Loop Detected (WebDAV)}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#508].
925+
#
926+
# References:
927+
#
928+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/508].
929+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#508].
930+
#
880931
class HTTPLoopDetected < HTTPServerError
881932
HAS_BODY = true
882933
end
@@ -885,15 +936,25 @@ class HTTPLoopDetected < HTTPServerError
885936
# Response class for <tt>Not Extended</tt> responses (status code 510).
886937
#
887938
# Further extensions to the request are required for the server to fulfill it.
888-
# See {510 Not Extended}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#510].
939+
#
940+
# References:
941+
#
942+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/510].
943+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#510].
944+
#
889945
class HTTPNotExtended < HTTPServerError
890946
HAS_BODY = true
891947
end
892948

893949
# Response class for <tt>Network Authentication Required</tt> responses (status code 511).
894950
#
895951
# The client needs to authenticate to gain network access.
896-
# See {511 Network Authentication Required}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#511].
952+
#
953+
# References:
954+
#
955+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/511].
956+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#511].
957+
#
897958
class HTTPNetworkAuthenticationRequired < HTTPServerError
898959
HAS_BODY = true
899960
end

0 commit comments

Comments
 (0)