net-http 0.3.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/{LICENSE.txt → BSDL} +3 -3
- data/COPYING +56 -0
- data/Gemfile +1 -0
- data/README.md +2 -1
- data/Rakefile +0 -7
- data/doc/net-http/examples.rdoc +2 -1
- data/doc/net-http/included_getters.rdoc +3 -0
- data/lib/net/http/exceptions.rb +1 -1
- data/lib/net/http/generic_request.rb +91 -15
- data/lib/net/http/header.rb +165 -68
- data/lib/net/http/proxy_delta.rb +1 -1
- data/lib/net/http/request.rb +50 -5
- data/lib/net/http/requests.rb +36 -1
- data/lib/net/http/response.rb +42 -22
- data/lib/net/http/responses.rb +507 -55
- data/lib/net/http/status.rb +7 -6
- data/lib/net/http.rb +1062 -498
- data/lib/net/https.rb +1 -1
- data/net-http.gemspec +9 -4
- metadata +9 -11
- data/.github/dependabot.yml +0 -6
- data/.github/workflows/test.yml +0 -22
- data/.gitignore +0 -7
- data/lib/net/http/backward.rb +0 -40
data/lib/net/http/responses.rb
CHANGED
@@ -85,6 +85,8 @@ module Net
|
|
85
85
|
#
|
86
86
|
# A +Continue+ response indicates that the server has received the request headers.
|
87
87
|
#
|
88
|
+
# :include: doc/net-http/included_getters.rdoc
|
89
|
+
#
|
88
90
|
# References:
|
89
91
|
#
|
90
92
|
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/100].
|
@@ -100,6 +102,8 @@ module Net
|
|
100
102
|
# The <tt>Switching Protocol<tt> response indicates that the server has received
|
101
103
|
# a request to switch protocols, and has agreed to do so.
|
102
104
|
#
|
105
|
+
# :include: doc/net-http/included_getters.rdoc
|
106
|
+
#
|
103
107
|
# References:
|
104
108
|
#
|
105
109
|
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/101].
|
@@ -115,8 +119,11 @@ module Net
|
|
115
119
|
# The +Processing+ response indicates that the server has received
|
116
120
|
# and is processing the request, but no response is available yet.
|
117
121
|
#
|
122
|
+
# :include: doc/net-http/included_getters.rdoc
|
123
|
+
#
|
118
124
|
# References:
|
119
125
|
#
|
126
|
+
# - {RFC 2518}[https://www.rfc-editor.org/rfc/rfc2518#section-10.1].
|
120
127
|
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#102].
|
121
128
|
#
|
122
129
|
class HTTPProcessing < HTTPInformation
|
@@ -129,9 +136,12 @@ module Net
|
|
129
136
|
# and is processing the request, and contains certain headers;
|
130
137
|
# the final response is not available yet.
|
131
138
|
#
|
139
|
+
# :include: doc/net-http/included_getters.rdoc
|
140
|
+
#
|
132
141
|
# References:
|
133
142
|
#
|
134
143
|
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/103].
|
144
|
+
# - {RFC 8297}[https://www.rfc-editor.org/rfc/rfc8297.html#section-2].
|
135
145
|
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#103].
|
136
146
|
#
|
137
147
|
class HTTPEarlyHints < HTTPInformation
|
@@ -142,7 +152,15 @@ module Net
|
|
142
152
|
#
|
143
153
|
# The +OK+ response indicates that the server has received
|
144
154
|
# a request and has responded successfully.
|
145
|
-
#
|
155
|
+
#
|
156
|
+
# :include: doc/net-http/included_getters.rdoc
|
157
|
+
#
|
158
|
+
# References:
|
159
|
+
#
|
160
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/200].
|
161
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-200-ok].
|
162
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#200].
|
163
|
+
#
|
146
164
|
class HTTPOK < HTTPSuccess
|
147
165
|
HAS_BODY = true
|
148
166
|
end
|
@@ -151,7 +169,15 @@ module Net
|
|
151
169
|
#
|
152
170
|
# The +Created+ response indicates that the server has received
|
153
171
|
# and has fulfilled a request to create a new resource.
|
154
|
-
#
|
172
|
+
#
|
173
|
+
# :include: doc/net-http/included_getters.rdoc
|
174
|
+
#
|
175
|
+
# References:
|
176
|
+
#
|
177
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/201].
|
178
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-201-created].
|
179
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#201].
|
180
|
+
#
|
155
181
|
class HTTPCreated < HTTPSuccess
|
156
182
|
HAS_BODY = true
|
157
183
|
end
|
@@ -160,7 +186,15 @@ module Net
|
|
160
186
|
#
|
161
187
|
# The +Accepted+ response indicates that the server has received
|
162
188
|
# and is processing a request, but the processing has not yet been completed.
|
163
|
-
#
|
189
|
+
#
|
190
|
+
# :include: doc/net-http/included_getters.rdoc
|
191
|
+
#
|
192
|
+
# References:
|
193
|
+
#
|
194
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/202].
|
195
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-202-accepted].
|
196
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#202].
|
197
|
+
#
|
164
198
|
class HTTPAccepted < HTTPSuccess
|
165
199
|
HAS_BODY = true
|
166
200
|
end
|
@@ -171,7 +205,15 @@ module Net
|
|
171
205
|
# is a transforming proxy (such as a Web accelerator)
|
172
206
|
# that received a 200 OK response from its origin,
|
173
207
|
# and is returning a modified version of the origin's response.
|
174
|
-
#
|
208
|
+
#
|
209
|
+
# :include: doc/net-http/included_getters.rdoc
|
210
|
+
#
|
211
|
+
# References:
|
212
|
+
#
|
213
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/203].
|
214
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-203-non-authoritative-infor].
|
215
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#203].
|
216
|
+
#
|
175
217
|
class HTTPNonAuthoritativeInformation < HTTPSuccess
|
176
218
|
HAS_BODY = true
|
177
219
|
end
|
@@ -180,7 +222,15 @@ module Net
|
|
180
222
|
#
|
181
223
|
# The <tt>No Content</tt> response indicates that the server
|
182
224
|
# successfully processed the request, and is not returning any content.
|
183
|
-
#
|
225
|
+
#
|
226
|
+
# :include: doc/net-http/included_getters.rdoc
|
227
|
+
#
|
228
|
+
# References:
|
229
|
+
#
|
230
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/204].
|
231
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-204-no-content].
|
232
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#204].
|
233
|
+
#
|
184
234
|
class HTTPNoContent < HTTPSuccess
|
185
235
|
HAS_BODY = false
|
186
236
|
end
|
@@ -190,7 +240,15 @@ module Net
|
|
190
240
|
# The <tt>Reset Content</tt> response indicates that the server
|
191
241
|
# successfully processed the request,
|
192
242
|
# asks that the client reset its document view, and is not returning any content.
|
193
|
-
#
|
243
|
+
#
|
244
|
+
# :include: doc/net-http/included_getters.rdoc
|
245
|
+
#
|
246
|
+
# References:
|
247
|
+
#
|
248
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/205].
|
249
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-205-reset-content].
|
250
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#205].
|
251
|
+
#
|
194
252
|
class HTTPResetContent < HTTPSuccess
|
195
253
|
HAS_BODY = false
|
196
254
|
end
|
@@ -200,7 +258,15 @@ module Net
|
|
200
258
|
# The <tt>Partial Content</tt> response indicates that the server is delivering
|
201
259
|
# only part of the resource (byte serving)
|
202
260
|
# due to a Range header in the request.
|
203
|
-
#
|
261
|
+
#
|
262
|
+
# :include: doc/net-http/included_getters.rdoc
|
263
|
+
#
|
264
|
+
# References:
|
265
|
+
#
|
266
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/206].
|
267
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-206-partial-content].
|
268
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#206].
|
269
|
+
#
|
204
270
|
class HTTPPartialContent < HTTPSuccess
|
205
271
|
HAS_BODY = true
|
206
272
|
end
|
@@ -210,7 +276,14 @@ module Net
|
|
210
276
|
# The <tt>Multi-Status (WebDAV)</tt> response indicates that the server
|
211
277
|
# has received the request,
|
212
278
|
# and that the message body can contain a number of separate response codes.
|
213
|
-
#
|
279
|
+
#
|
280
|
+
# :include: doc/net-http/included_getters.rdoc
|
281
|
+
#
|
282
|
+
# References:
|
283
|
+
#
|
284
|
+
# - {RFC 4818}[https://www.rfc-editor.org/rfc/rfc4918#section-11.1].
|
285
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#207].
|
286
|
+
#
|
214
287
|
class HTTPMultiStatus < HTTPSuccess
|
215
288
|
HAS_BODY = true
|
216
289
|
end
|
@@ -222,7 +295,14 @@ module Net
|
|
222
295
|
# and that the members of a DAV binding have already been enumerated
|
223
296
|
# in a preceding part of the (multi-status) response,
|
224
297
|
# and are not being included again.
|
225
|
-
#
|
298
|
+
#
|
299
|
+
# :include: doc/net-http/included_getters.rdoc
|
300
|
+
#
|
301
|
+
# References:
|
302
|
+
#
|
303
|
+
# - {RFC 5842}[https://www.rfc-editor.org/rfc/rfc5842.html#section-7.1].
|
304
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#208].
|
305
|
+
#
|
226
306
|
class HTTPAlreadyReported < HTTPSuccess
|
227
307
|
HAS_BODY = true
|
228
308
|
end
|
@@ -232,7 +312,14 @@ module Net
|
|
232
312
|
# The <tt>IM Used</tt> response indicates that the server has fulfilled a request
|
233
313
|
# for the resource, and the response is a representation of the result
|
234
314
|
# of one or more instance-manipulations applied to the current instance.
|
235
|
-
#
|
315
|
+
#
|
316
|
+
# :include: doc/net-http/included_getters.rdoc
|
317
|
+
#
|
318
|
+
# References:
|
319
|
+
#
|
320
|
+
# - {RFC 3229}[https://www.rfc-editor.org/rfc/rfc3229.html#section-10.4.1].
|
321
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#226].
|
322
|
+
#
|
236
323
|
class HTTPIMUsed < HTTPSuccess
|
237
324
|
HAS_BODY = true
|
238
325
|
end
|
@@ -241,7 +328,15 @@ module Net
|
|
241
328
|
#
|
242
329
|
# The <tt>Multiple Choices</tt> response indicates that the server
|
243
330
|
# offers multiple options for the resource from which the client may choose.
|
244
|
-
#
|
331
|
+
#
|
332
|
+
# :include: doc/net-http/included_getters.rdoc
|
333
|
+
#
|
334
|
+
# References:
|
335
|
+
#
|
336
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/300].
|
337
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-300-multiple-choices].
|
338
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#300].
|
339
|
+
#
|
245
340
|
class HTTPMultipleChoices < HTTPRedirection
|
246
341
|
HAS_BODY = true
|
247
342
|
end
|
@@ -251,7 +346,15 @@ module Net
|
|
251
346
|
#
|
252
347
|
# The <tt>Moved Permanently</tt> response indicates that links or records
|
253
348
|
# returning this response should be updated to use the given URL.
|
254
|
-
#
|
349
|
+
#
|
350
|
+
# :include: doc/net-http/included_getters.rdoc
|
351
|
+
#
|
352
|
+
# References:
|
353
|
+
#
|
354
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/301].
|
355
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-301-moved-permanently].
|
356
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#301].
|
357
|
+
#
|
255
358
|
class HTTPMovedPermanently < HTTPRedirection
|
256
359
|
HAS_BODY = true
|
257
360
|
end
|
@@ -260,7 +363,15 @@ module Net
|
|
260
363
|
#
|
261
364
|
# The <tt>Found</tt> response indicates that the client
|
262
365
|
# should look at (browse to) another URL.
|
263
|
-
#
|
366
|
+
#
|
367
|
+
# :include: doc/net-http/included_getters.rdoc
|
368
|
+
#
|
369
|
+
# References:
|
370
|
+
#
|
371
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/302].
|
372
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-302-found].
|
373
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#302].
|
374
|
+
#
|
264
375
|
class HTTPFound < HTTPRedirection
|
265
376
|
HAS_BODY = true
|
266
377
|
end
|
@@ -269,7 +380,15 @@ module Net
|
|
269
380
|
# Response class for <tt>See Other</tt> responses (status code 303).
|
270
381
|
#
|
271
382
|
# The response to the request can be found under another URI using the GET method.
|
272
|
-
#
|
383
|
+
#
|
384
|
+
# :include: doc/net-http/included_getters.rdoc
|
385
|
+
#
|
386
|
+
# References:
|
387
|
+
#
|
388
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/303].
|
389
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-303-see-other].
|
390
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#303].
|
391
|
+
#
|
273
392
|
class HTTPSeeOther < HTTPRedirection
|
274
393
|
HAS_BODY = true
|
275
394
|
end
|
@@ -278,7 +397,15 @@ module Net
|
|
278
397
|
#
|
279
398
|
# Indicates that the resource has not been modified since the version
|
280
399
|
# specified by the request headers.
|
281
|
-
#
|
400
|
+
#
|
401
|
+
# :include: doc/net-http/included_getters.rdoc
|
402
|
+
#
|
403
|
+
# References:
|
404
|
+
#
|
405
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/304].
|
406
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-304-not-modified].
|
407
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#304].
|
408
|
+
#
|
282
409
|
class HTTPNotModified < HTTPRedirection
|
283
410
|
HAS_BODY = false
|
284
411
|
end
|
@@ -287,7 +414,14 @@ module Net
|
|
287
414
|
#
|
288
415
|
# The requested resource is available only through a proxy,
|
289
416
|
# whose address is provided in the response.
|
290
|
-
#
|
417
|
+
#
|
418
|
+
# :include: doc/net-http/included_getters.rdoc
|
419
|
+
#
|
420
|
+
# References:
|
421
|
+
#
|
422
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-305-use-proxy].
|
423
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#305].
|
424
|
+
#
|
291
425
|
class HTTPUseProxy < HTTPRedirection
|
292
426
|
HAS_BODY = false
|
293
427
|
end
|
@@ -296,7 +430,15 @@ module Net
|
|
296
430
|
#
|
297
431
|
# The request should be repeated with another URI;
|
298
432
|
# however, future requests should still use the original URI.
|
299
|
-
#
|
433
|
+
#
|
434
|
+
# :include: doc/net-http/included_getters.rdoc
|
435
|
+
#
|
436
|
+
# References:
|
437
|
+
#
|
438
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/307].
|
439
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-307-temporary-redirect].
|
440
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#307].
|
441
|
+
#
|
300
442
|
class HTTPTemporaryRedirect < HTTPRedirection
|
301
443
|
HAS_BODY = true
|
302
444
|
end
|
@@ -304,7 +446,15 @@ module Net
|
|
304
446
|
# Response class for <tt>Permanent Redirect</tt> responses (status code 308).
|
305
447
|
#
|
306
448
|
# This and all future requests should be directed to the given URI.
|
307
|
-
#
|
449
|
+
#
|
450
|
+
# :include: doc/net-http/included_getters.rdoc
|
451
|
+
#
|
452
|
+
# References:
|
453
|
+
#
|
454
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/308].
|
455
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-308-permanent-redirect].
|
456
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#308].
|
457
|
+
#
|
308
458
|
class HTTPPermanentRedirect < HTTPRedirection
|
309
459
|
HAS_BODY = true
|
310
460
|
end
|
@@ -312,7 +462,15 @@ module Net
|
|
312
462
|
# Response class for <tt>Bad Request</tt> responses (status code 400).
|
313
463
|
#
|
314
464
|
# The server cannot or will not process the request due to an apparent client error.
|
315
|
-
#
|
465
|
+
#
|
466
|
+
# :include: doc/net-http/included_getters.rdoc
|
467
|
+
#
|
468
|
+
# References:
|
469
|
+
#
|
470
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/400].
|
471
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-400-bad-request].
|
472
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#400].
|
473
|
+
#
|
316
474
|
class HTTPBadRequest < HTTPClientError
|
317
475
|
HAS_BODY = true
|
318
476
|
end
|
@@ -320,7 +478,15 @@ module Net
|
|
320
478
|
# Response class for <tt>Unauthorized</tt> responses (status code 401).
|
321
479
|
#
|
322
480
|
# Authentication is required, but either was not provided or failed.
|
323
|
-
#
|
481
|
+
#
|
482
|
+
# :include: doc/net-http/included_getters.rdoc
|
483
|
+
#
|
484
|
+
# References:
|
485
|
+
#
|
486
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401].
|
487
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-401-unauthorized].
|
488
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#401].
|
489
|
+
#
|
324
490
|
class HTTPUnauthorized < HTTPClientError
|
325
491
|
HAS_BODY = true
|
326
492
|
end
|
@@ -328,7 +494,15 @@ module Net
|
|
328
494
|
# Response class for <tt>Payment Required</tt> responses (status code 402).
|
329
495
|
#
|
330
496
|
# Reserved for future use.
|
331
|
-
#
|
497
|
+
#
|
498
|
+
# :include: doc/net-http/included_getters.rdoc
|
499
|
+
#
|
500
|
+
# References:
|
501
|
+
#
|
502
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/402].
|
503
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-402-payment-required].
|
504
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#402].
|
505
|
+
#
|
332
506
|
class HTTPPaymentRequired < HTTPClientError
|
333
507
|
HAS_BODY = true
|
334
508
|
end
|
@@ -337,7 +511,15 @@ module Net
|
|
337
511
|
#
|
338
512
|
# The request contained valid data and was understood by the server,
|
339
513
|
# but the server is refusing action.
|
340
|
-
#
|
514
|
+
#
|
515
|
+
# :include: doc/net-http/included_getters.rdoc
|
516
|
+
#
|
517
|
+
# References:
|
518
|
+
#
|
519
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/403].
|
520
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-403-forbidden].
|
521
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#403].
|
522
|
+
#
|
341
523
|
class HTTPForbidden < HTTPClientError
|
342
524
|
HAS_BODY = true
|
343
525
|
end
|
@@ -345,7 +527,15 @@ module Net
|
|
345
527
|
# Response class for <tt>Not Found</tt> responses (status code 404).
|
346
528
|
#
|
347
529
|
# The requested resource could not be found but may be available in the future.
|
348
|
-
#
|
530
|
+
#
|
531
|
+
# :include: doc/net-http/included_getters.rdoc
|
532
|
+
#
|
533
|
+
# References:
|
534
|
+
#
|
535
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/404].
|
536
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-404-not-found].
|
537
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#404].
|
538
|
+
#
|
349
539
|
class HTTPNotFound < HTTPClientError
|
350
540
|
HAS_BODY = true
|
351
541
|
end
|
@@ -353,7 +543,15 @@ module Net
|
|
353
543
|
# Response class for <tt>Method Not Allowed</tt> responses (status code 405).
|
354
544
|
#
|
355
545
|
# The request method is not supported for the requested resource.
|
356
|
-
#
|
546
|
+
#
|
547
|
+
# :include: doc/net-http/included_getters.rdoc
|
548
|
+
#
|
549
|
+
# References:
|
550
|
+
#
|
551
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/405].
|
552
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-405-method-not-allowed].
|
553
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#405].
|
554
|
+
#
|
357
555
|
class HTTPMethodNotAllowed < HTTPClientError
|
358
556
|
HAS_BODY = true
|
359
557
|
end
|
@@ -362,7 +560,15 @@ module Net
|
|
362
560
|
#
|
363
561
|
# The requested resource is capable of generating only content
|
364
562
|
# that not acceptable according to the Accept headers sent in the request.
|
365
|
-
#
|
563
|
+
#
|
564
|
+
# :include: doc/net-http/included_getters.rdoc
|
565
|
+
#
|
566
|
+
# References:
|
567
|
+
#
|
568
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/406].
|
569
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-406-not-acceptable].
|
570
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#406].
|
571
|
+
#
|
366
572
|
class HTTPNotAcceptable < HTTPClientError
|
367
573
|
HAS_BODY = true
|
368
574
|
end
|
@@ -370,7 +576,15 @@ module Net
|
|
370
576
|
# Response class for <tt>Proxy Authentication Required</tt> responses (status code 407).
|
371
577
|
#
|
372
578
|
# The client must first authenticate itself with the proxy.
|
373
|
-
#
|
579
|
+
#
|
580
|
+
# :include: doc/net-http/included_getters.rdoc
|
581
|
+
#
|
582
|
+
# References:
|
583
|
+
#
|
584
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/407].
|
585
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-407-proxy-authentication-re].
|
586
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#407].
|
587
|
+
#
|
374
588
|
class HTTPProxyAuthenticationRequired < HTTPClientError
|
375
589
|
HAS_BODY = true
|
376
590
|
end
|
@@ -378,7 +592,15 @@ module Net
|
|
378
592
|
# Response class for <tt>Request Timeout</tt> responses (status code 408).
|
379
593
|
#
|
380
594
|
# The server timed out waiting for the request.
|
381
|
-
#
|
595
|
+
#
|
596
|
+
# :include: doc/net-http/included_getters.rdoc
|
597
|
+
#
|
598
|
+
# References:
|
599
|
+
#
|
600
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/408].
|
601
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-408-request-timeout].
|
602
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#408].
|
603
|
+
#
|
382
604
|
class HTTPRequestTimeout < HTTPClientError
|
383
605
|
HAS_BODY = true
|
384
606
|
end
|
@@ -387,7 +609,15 @@ module Net
|
|
387
609
|
# Response class for <tt>Conflict</tt> responses (status code 409).
|
388
610
|
#
|
389
611
|
# The request could not be processed because of conflict in the current state of the resource.
|
390
|
-
#
|
612
|
+
#
|
613
|
+
# :include: doc/net-http/included_getters.rdoc
|
614
|
+
#
|
615
|
+
# References:
|
616
|
+
#
|
617
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/409].
|
618
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-409-conflict].
|
619
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#409].
|
620
|
+
#
|
391
621
|
class HTTPConflict < HTTPClientError
|
392
622
|
HAS_BODY = true
|
393
623
|
end
|
@@ -396,7 +626,15 @@ module Net
|
|
396
626
|
#
|
397
627
|
# The resource requested was previously in use but is no longer available
|
398
628
|
# and will not be available again.
|
399
|
-
#
|
629
|
+
#
|
630
|
+
# :include: doc/net-http/included_getters.rdoc
|
631
|
+
#
|
632
|
+
# References:
|
633
|
+
#
|
634
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/410].
|
635
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-410-gone].
|
636
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#410].
|
637
|
+
#
|
400
638
|
class HTTPGone < HTTPClientError
|
401
639
|
HAS_BODY = true
|
402
640
|
end
|
@@ -405,7 +643,15 @@ module Net
|
|
405
643
|
#
|
406
644
|
# The request did not specify the length of its content,
|
407
645
|
# which is required by the requested resource.
|
408
|
-
#
|
646
|
+
#
|
647
|
+
# :include: doc/net-http/included_getters.rdoc
|
648
|
+
#
|
649
|
+
# References:
|
650
|
+
#
|
651
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/411].
|
652
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-411-length-required].
|
653
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#411].
|
654
|
+
#
|
409
655
|
class HTTPLengthRequired < HTTPClientError
|
410
656
|
HAS_BODY = true
|
411
657
|
end
|
@@ -414,7 +660,15 @@ module Net
|
|
414
660
|
#
|
415
661
|
# The server does not meet one of the preconditions
|
416
662
|
# specified in the request headers.
|
417
|
-
#
|
663
|
+
#
|
664
|
+
# :include: doc/net-http/included_getters.rdoc
|
665
|
+
#
|
666
|
+
# References:
|
667
|
+
#
|
668
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/412].
|
669
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-412-precondition-failed].
|
670
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#412].
|
671
|
+
#
|
418
672
|
class HTTPPreconditionFailed < HTTPClientError
|
419
673
|
HAS_BODY = true
|
420
674
|
end
|
@@ -422,7 +676,15 @@ module Net
|
|
422
676
|
# Response class for <tt>Payload Too Large</tt> responses (status code 413).
|
423
677
|
#
|
424
678
|
# The request is larger than the server is willing or able to process.
|
425
|
-
#
|
679
|
+
#
|
680
|
+
# :include: doc/net-http/included_getters.rdoc
|
681
|
+
#
|
682
|
+
# References:
|
683
|
+
#
|
684
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/413].
|
685
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-413-content-too-large].
|
686
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#413].
|
687
|
+
#
|
426
688
|
class HTTPPayloadTooLarge < HTTPClientError
|
427
689
|
HAS_BODY = true
|
428
690
|
end
|
@@ -431,7 +693,15 @@ module Net
|
|
431
693
|
# Response class for <tt>URI Too Long</tt> responses (status code 414).
|
432
694
|
#
|
433
695
|
# The URI provided was too long for the server to process.
|
434
|
-
#
|
696
|
+
#
|
697
|
+
# :include: doc/net-http/included_getters.rdoc
|
698
|
+
#
|
699
|
+
# References:
|
700
|
+
#
|
701
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/414].
|
702
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-414-uri-too-long].
|
703
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#414].
|
704
|
+
#
|
435
705
|
class HTTPURITooLong < HTTPClientError
|
436
706
|
HAS_BODY = true
|
437
707
|
end
|
@@ -441,7 +711,15 @@ module Net
|
|
441
711
|
# Response class for <tt>Unsupported Media Type</tt> responses (status code 415).
|
442
712
|
#
|
443
713
|
# The request entity has a media type which the server or resource does not support.
|
444
|
-
#
|
714
|
+
#
|
715
|
+
# :include: doc/net-http/included_getters.rdoc
|
716
|
+
#
|
717
|
+
# References:
|
718
|
+
#
|
719
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/415].
|
720
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-415-unsupported-media-type].
|
721
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#415].
|
722
|
+
#
|
445
723
|
class HTTPUnsupportedMediaType < HTTPClientError
|
446
724
|
HAS_BODY = true
|
447
725
|
end
|
@@ -449,7 +727,15 @@ module Net
|
|
449
727
|
# Response class for <tt>Range Not Satisfiable</tt> responses (status code 416).
|
450
728
|
#
|
451
729
|
# The request entity has a media type which the server or resource does not support.
|
452
|
-
#
|
730
|
+
#
|
731
|
+
# :include: doc/net-http/included_getters.rdoc
|
732
|
+
#
|
733
|
+
# References:
|
734
|
+
#
|
735
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/416].
|
736
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-416-range-not-satisfiable].
|
737
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#416].
|
738
|
+
#
|
453
739
|
class HTTPRangeNotSatisfiable < HTTPClientError
|
454
740
|
HAS_BODY = true
|
455
741
|
end
|
@@ -458,7 +744,15 @@ module Net
|
|
458
744
|
# Response class for <tt>Expectation Failed</tt> responses (status code 417).
|
459
745
|
#
|
460
746
|
# The server cannot meet the requirements of the Expect request-header field.
|
461
|
-
#
|
747
|
+
#
|
748
|
+
# :include: doc/net-http/included_getters.rdoc
|
749
|
+
#
|
750
|
+
# References:
|
751
|
+
#
|
752
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/417].
|
753
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-417-expectation-failed].
|
754
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#417].
|
755
|
+
#
|
462
756
|
class HTTPExpectationFailed < HTTPClientError
|
463
757
|
HAS_BODY = true
|
464
758
|
end
|
@@ -471,7 +765,14 @@ module Net
|
|
471
765
|
# Response class for <tt>Misdirected Request</tt> responses (status code 421).
|
472
766
|
#
|
473
767
|
# The request was directed at a server that is not able to produce a response.
|
474
|
-
#
|
768
|
+
#
|
769
|
+
# :include: doc/net-http/included_getters.rdoc
|
770
|
+
#
|
771
|
+
# References:
|
772
|
+
#
|
773
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-421-misdirected-request].
|
774
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#421].
|
775
|
+
#
|
475
776
|
class HTTPMisdirectedRequest < HTTPClientError
|
476
777
|
HAS_BODY = true
|
477
778
|
end
|
@@ -479,7 +780,15 @@ module Net
|
|
479
780
|
# Response class for <tt>Unprocessable Entity</tt> responses (status code 422).
|
480
781
|
#
|
481
782
|
# The request was well-formed but had semantic errors.
|
482
|
-
#
|
783
|
+
#
|
784
|
+
# :include: doc/net-http/included_getters.rdoc
|
785
|
+
#
|
786
|
+
# References:
|
787
|
+
#
|
788
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/422].
|
789
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-422-unprocessable-content].
|
790
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#422].
|
791
|
+
#
|
483
792
|
class HTTPUnprocessableEntity < HTTPClientError
|
484
793
|
HAS_BODY = true
|
485
794
|
end
|
@@ -487,7 +796,14 @@ module Net
|
|
487
796
|
# Response class for <tt>Locked (WebDAV)</tt> responses (status code 423).
|
488
797
|
#
|
489
798
|
# The requested resource is locked.
|
490
|
-
#
|
799
|
+
#
|
800
|
+
# :include: doc/net-http/included_getters.rdoc
|
801
|
+
#
|
802
|
+
# References:
|
803
|
+
#
|
804
|
+
# - {RFC 4918}[https://www.rfc-editor.org/rfc/rfc4918#section-11.3].
|
805
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#423].
|
806
|
+
#
|
491
807
|
class HTTPLocked < HTTPClientError
|
492
808
|
HAS_BODY = true
|
493
809
|
end
|
@@ -496,6 +812,14 @@ module Net
|
|
496
812
|
#
|
497
813
|
# The request failed because it depended on another request and that request failed.
|
498
814
|
# See {424 Failed Dependency (WebDAV)}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#424].
|
815
|
+
#
|
816
|
+
# :include: doc/net-http/included_getters.rdoc
|
817
|
+
#
|
818
|
+
# References:
|
819
|
+
#
|
820
|
+
# - {RFC 4918}[https://www.rfc-editor.org/rfc/rfc4918#section-11.4].
|
821
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#424].
|
822
|
+
#
|
499
823
|
class HTTPFailedDependency < HTTPClientError
|
500
824
|
HAS_BODY = true
|
501
825
|
end
|
@@ -506,7 +830,15 @@ module Net
|
|
506
830
|
# Response class for <tt>Upgrade Required</tt> responses (status code 426).
|
507
831
|
#
|
508
832
|
# The client should switch to the protocol given in the Upgrade header field.
|
509
|
-
#
|
833
|
+
#
|
834
|
+
# :include: doc/net-http/included_getters.rdoc
|
835
|
+
#
|
836
|
+
# References:
|
837
|
+
#
|
838
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/426].
|
839
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-426-upgrade-required].
|
840
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#426].
|
841
|
+
#
|
510
842
|
class HTTPUpgradeRequired < HTTPClientError
|
511
843
|
HAS_BODY = true
|
512
844
|
end
|
@@ -514,7 +846,15 @@ module Net
|
|
514
846
|
# Response class for <tt>Precondition Required</tt> responses (status code 428).
|
515
847
|
#
|
516
848
|
# The origin server requires the request to be conditional.
|
517
|
-
#
|
849
|
+
#
|
850
|
+
# :include: doc/net-http/included_getters.rdoc
|
851
|
+
#
|
852
|
+
# References:
|
853
|
+
#
|
854
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/428].
|
855
|
+
# - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-3].
|
856
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#428].
|
857
|
+
#
|
518
858
|
class HTTPPreconditionRequired < HTTPClientError
|
519
859
|
HAS_BODY = true
|
520
860
|
end
|
@@ -522,7 +862,15 @@ module Net
|
|
522
862
|
# Response class for <tt>Too Many Requests</tt> responses (status code 429).
|
523
863
|
#
|
524
864
|
# The user has sent too many requests in a given amount of time.
|
525
|
-
#
|
865
|
+
#
|
866
|
+
# :include: doc/net-http/included_getters.rdoc
|
867
|
+
#
|
868
|
+
# References:
|
869
|
+
#
|
870
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/429].
|
871
|
+
# - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-4].
|
872
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#429].
|
873
|
+
#
|
526
874
|
class HTTPTooManyRequests < HTTPClientError
|
527
875
|
HAS_BODY = true
|
528
876
|
end
|
@@ -531,7 +879,15 @@ module Net
|
|
531
879
|
#
|
532
880
|
# An individual header field is too large,
|
533
881
|
# or all the header fields collectively, are too large.
|
534
|
-
#
|
882
|
+
#
|
883
|
+
# :include: doc/net-http/included_getters.rdoc
|
884
|
+
#
|
885
|
+
# References:
|
886
|
+
#
|
887
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/431].
|
888
|
+
# - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-5].
|
889
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#431].
|
890
|
+
#
|
535
891
|
class HTTPRequestHeaderFieldsTooLarge < HTTPClientError
|
536
892
|
HAS_BODY = true
|
537
893
|
end
|
@@ -540,7 +896,15 @@ module Net
|
|
540
896
|
#
|
541
897
|
# A server operator has received a legal demand to deny access to a resource or to a set of resources
|
542
898
|
# that includes the requested resource.
|
543
|
-
#
|
899
|
+
#
|
900
|
+
# :include: doc/net-http/included_getters.rdoc
|
901
|
+
#
|
902
|
+
# References:
|
903
|
+
#
|
904
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/451].
|
905
|
+
# - {RFC 7725}[https://www.rfc-editor.org/rfc/rfc7725.html#section-3].
|
906
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#451].
|
907
|
+
#
|
544
908
|
class HTTPUnavailableForLegalReasons < HTTPClientError
|
545
909
|
HAS_BODY = true
|
546
910
|
end
|
@@ -552,7 +916,15 @@ module Net
|
|
552
916
|
# Response class for <tt>Internal Server Error</tt> responses (status code 500).
|
553
917
|
#
|
554
918
|
# An unexpected condition was encountered and no more specific message is suitable.
|
555
|
-
#
|
919
|
+
#
|
920
|
+
# :include: doc/net-http/included_getters.rdoc
|
921
|
+
#
|
922
|
+
# References:
|
923
|
+
#
|
924
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/500].
|
925
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-500-internal-server-error].
|
926
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#500].
|
927
|
+
#
|
556
928
|
class HTTPInternalServerError < HTTPServerError
|
557
929
|
HAS_BODY = true
|
558
930
|
end
|
@@ -561,7 +933,15 @@ module Net
|
|
561
933
|
#
|
562
934
|
# The server either does not recognize the request method,
|
563
935
|
# or it lacks the ability to fulfil the request.
|
564
|
-
#
|
936
|
+
#
|
937
|
+
# :include: doc/net-http/included_getters.rdoc
|
938
|
+
#
|
939
|
+
# References:
|
940
|
+
#
|
941
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/501].
|
942
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-501-not-implemented].
|
943
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#501].
|
944
|
+
#
|
565
945
|
class HTTPNotImplemented < HTTPServerError
|
566
946
|
HAS_BODY = true
|
567
947
|
end
|
@@ -570,7 +950,15 @@ module Net
|
|
570
950
|
#
|
571
951
|
# The server was acting as a gateway or proxy
|
572
952
|
# and received an invalid response from the upstream server.
|
573
|
-
#
|
953
|
+
#
|
954
|
+
# :include: doc/net-http/included_getters.rdoc
|
955
|
+
#
|
956
|
+
# References:
|
957
|
+
#
|
958
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/502].
|
959
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-502-bad-gateway].
|
960
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#502].
|
961
|
+
#
|
574
962
|
class HTTPBadGateway < HTTPServerError
|
575
963
|
HAS_BODY = true
|
576
964
|
end
|
@@ -579,7 +967,15 @@ module Net
|
|
579
967
|
#
|
580
968
|
# The server cannot handle the request
|
581
969
|
# (because it is overloaded or down for maintenance).
|
582
|
-
#
|
970
|
+
#
|
971
|
+
# :include: doc/net-http/included_getters.rdoc
|
972
|
+
#
|
973
|
+
# References:
|
974
|
+
#
|
975
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/503].
|
976
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-503-service-unavailable].
|
977
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#503].
|
978
|
+
#
|
583
979
|
class HTTPServiceUnavailable < HTTPServerError
|
584
980
|
HAS_BODY = true
|
585
981
|
end
|
@@ -588,7 +984,15 @@ module Net
|
|
588
984
|
#
|
589
985
|
# The server was acting as a gateway or proxy
|
590
986
|
# and did not receive a timely response from the upstream server.
|
591
|
-
#
|
987
|
+
#
|
988
|
+
# :include: doc/net-http/included_getters.rdoc
|
989
|
+
#
|
990
|
+
# References:
|
991
|
+
#
|
992
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/504].
|
993
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-504-gateway-timeout].
|
994
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#504].
|
995
|
+
#
|
592
996
|
class HTTPGatewayTimeout < HTTPServerError
|
593
997
|
HAS_BODY = true
|
594
998
|
end
|
@@ -597,7 +1001,15 @@ module Net
|
|
597
1001
|
# Response class for <tt>HTTP Version Not Supported</tt> responses (status code 505).
|
598
1002
|
#
|
599
1003
|
# The server does not support the HTTP version used in the request.
|
600
|
-
#
|
1004
|
+
#
|
1005
|
+
# :include: doc/net-http/included_getters.rdoc
|
1006
|
+
#
|
1007
|
+
# References:
|
1008
|
+
#
|
1009
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/505].
|
1010
|
+
# - {RFC 9110}[https://www.rfc-editor.org/rfc/rfc9110.html#name-505-http-version-not-suppor].
|
1011
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#505].
|
1012
|
+
#
|
601
1013
|
class HTTPVersionNotSupported < HTTPServerError
|
602
1014
|
HAS_BODY = true
|
603
1015
|
end
|
@@ -605,7 +1017,15 @@ module Net
|
|
605
1017
|
# Response class for <tt>Variant Also Negotiates</tt> responses (status code 506).
|
606
1018
|
#
|
607
1019
|
# Transparent content negotiation for the request results in a circular reference.
|
608
|
-
#
|
1020
|
+
#
|
1021
|
+
# :include: doc/net-http/included_getters.rdoc
|
1022
|
+
#
|
1023
|
+
# References:
|
1024
|
+
#
|
1025
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/506].
|
1026
|
+
# - {RFC 2295}[https://www.rfc-editor.org/rfc/rfc2295#section-8.1].
|
1027
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#506].
|
1028
|
+
#
|
609
1029
|
class HTTPVariantAlsoNegotiates < HTTPServerError
|
610
1030
|
HAS_BODY = true
|
611
1031
|
end
|
@@ -613,7 +1033,15 @@ module Net
|
|
613
1033
|
# Response class for <tt>Insufficient Storage (WebDAV)</tt> responses (status code 507).
|
614
1034
|
#
|
615
1035
|
# The server is unable to store the representation needed to complete the request.
|
616
|
-
#
|
1036
|
+
#
|
1037
|
+
# :include: doc/net-http/included_getters.rdoc
|
1038
|
+
#
|
1039
|
+
# References:
|
1040
|
+
#
|
1041
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/507].
|
1042
|
+
# - {RFC 4918}[https://www.rfc-editor.org/rfc/rfc4918#section-11.5].
|
1043
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#507].
|
1044
|
+
#
|
617
1045
|
class HTTPInsufficientStorage < HTTPServerError
|
618
1046
|
HAS_BODY = true
|
619
1047
|
end
|
@@ -621,7 +1049,15 @@ module Net
|
|
621
1049
|
# Response class for <tt>Loop Detected (WebDAV)</tt> responses (status code 508).
|
622
1050
|
#
|
623
1051
|
# The server detected an infinite loop while processing the request.
|
624
|
-
#
|
1052
|
+
#
|
1053
|
+
# :include: doc/net-http/included_getters.rdoc
|
1054
|
+
#
|
1055
|
+
# References:
|
1056
|
+
#
|
1057
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/508].
|
1058
|
+
# - {RFC 5942}[https://www.rfc-editor.org/rfc/rfc5842.html#section-7.2].
|
1059
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#508].
|
1060
|
+
#
|
625
1061
|
class HTTPLoopDetected < HTTPServerError
|
626
1062
|
HAS_BODY = true
|
627
1063
|
end
|
@@ -630,7 +1066,15 @@ module Net
|
|
630
1066
|
# Response class for <tt>Not Extended</tt> responses (status code 510).
|
631
1067
|
#
|
632
1068
|
# Further extensions to the request are required for the server to fulfill it.
|
633
|
-
#
|
1069
|
+
#
|
1070
|
+
# :include: doc/net-http/included_getters.rdoc
|
1071
|
+
#
|
1072
|
+
# References:
|
1073
|
+
#
|
1074
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/510].
|
1075
|
+
# - {RFC 2774}[https://www.rfc-editor.org/rfc/rfc2774.html#section-7].
|
1076
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#510].
|
1077
|
+
#
|
634
1078
|
class HTTPNotExtended < HTTPServerError
|
635
1079
|
HAS_BODY = true
|
636
1080
|
end
|
@@ -638,7 +1082,15 @@ module Net
|
|
638
1082
|
# Response class for <tt>Network Authentication Required</tt> responses (status code 511).
|
639
1083
|
#
|
640
1084
|
# The client needs to authenticate to gain network access.
|
641
|
-
#
|
1085
|
+
#
|
1086
|
+
# :include: doc/net-http/included_getters.rdoc
|
1087
|
+
#
|
1088
|
+
# References:
|
1089
|
+
#
|
1090
|
+
# - {Mozilla}[https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/511].
|
1091
|
+
# - {RFC 6585}[https://www.rfc-editor.org/rfc/rfc6585#section-6].
|
1092
|
+
# - {Wikipedia}[https://en.wikipedia.org/wiki/List_of_HTTP_status_codes#511].
|
1093
|
+
#
|
642
1094
|
class HTTPNetworkAuthenticationRequired < HTTPServerError
|
643
1095
|
HAS_BODY = true
|
644
1096
|
end
|