protocol-http 0.67.0 → 0.68.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
- checksums.yaml.gz.sig +0 -0
- data/lib/protocol/http/status.rb +89 -0
- data/lib/protocol/http/version.rb +1 -1
- data/lib/protocol/http.rb +1 -0
- data/readme.md +4 -4
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +2 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a3428056fc04e13182008e3f50f457e9b63b688c887c528e4afc8606e447c620
|
|
4
|
+
data.tar.gz: e1c5a2b380ff917013e2cdf1e8c6bda8a4995d3850fa960bf933177ebc518295
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6a0554e8f574add7c898db51ecccce34def388ba266c648487ef6f538c0db0d99966f2ee0c15d1462088587e29676ddf94f07531c257326442320cd2d30ab157
|
|
7
|
+
data.tar.gz: 4acaacb6205bc8dcdd5be3ed7a5993dff2012b7ac61ad3a8a1e6ea607c1f01b481218ef3b60efa6bc34a9a86f982077aabe9ec7bafe43b8659b9272cb1e11d6a
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
# Released under the MIT License.
|
|
4
|
+
# Copyright, 2026, by Samuel Williams.
|
|
5
|
+
|
|
6
|
+
module Protocol
|
|
7
|
+
module HTTP
|
|
8
|
+
# HTTP status codes and their human-readable descriptions.
|
|
9
|
+
module Status
|
|
10
|
+
# Human-readable descriptions for registered and conventional HTTP status codes.
|
|
11
|
+
DESCRIPTIONS = {
|
|
12
|
+
100 => "Continue",
|
|
13
|
+
101 => "Switching Protocols",
|
|
14
|
+
102 => "Processing",
|
|
15
|
+
103 => "Early Hints",
|
|
16
|
+
|
|
17
|
+
200 => "OK",
|
|
18
|
+
201 => "Created",
|
|
19
|
+
202 => "Accepted",
|
|
20
|
+
203 => "Non-Authoritative Information",
|
|
21
|
+
204 => "No Content",
|
|
22
|
+
205 => "Reset Content",
|
|
23
|
+
206 => "Partial Content",
|
|
24
|
+
207 => "Multi-Status",
|
|
25
|
+
208 => "Already Reported",
|
|
26
|
+
226 => "IM Used",
|
|
27
|
+
|
|
28
|
+
300 => "Multiple Choices",
|
|
29
|
+
301 => "Moved Permanently",
|
|
30
|
+
302 => "Found",
|
|
31
|
+
303 => "See Other",
|
|
32
|
+
304 => "Not Modified",
|
|
33
|
+
305 => "Use Proxy",
|
|
34
|
+
306 => "Switch Proxy",
|
|
35
|
+
307 => "Temporary Redirect",
|
|
36
|
+
308 => "Permanent Redirect",
|
|
37
|
+
|
|
38
|
+
400 => "Bad Request",
|
|
39
|
+
401 => "Unauthorized",
|
|
40
|
+
402 => "Payment Required",
|
|
41
|
+
403 => "Forbidden",
|
|
42
|
+
404 => "Not Found",
|
|
43
|
+
405 => "Method Not Allowed",
|
|
44
|
+
406 => "Not Acceptable",
|
|
45
|
+
407 => "Proxy Authentication Required",
|
|
46
|
+
408 => "Request Timeout",
|
|
47
|
+
409 => "Conflict",
|
|
48
|
+
410 => "Gone",
|
|
49
|
+
411 => "Length Required",
|
|
50
|
+
412 => "Precondition Failed",
|
|
51
|
+
413 => "Content Too Large",
|
|
52
|
+
414 => "URI Too Long",
|
|
53
|
+
415 => "Unsupported Media Type",
|
|
54
|
+
416 => "Range Not Satisfiable",
|
|
55
|
+
417 => "Expectation Failed",
|
|
56
|
+
418 => "I'm a Teapot",
|
|
57
|
+
421 => "Misdirected Request",
|
|
58
|
+
422 => "Unprocessable Content",
|
|
59
|
+
423 => "Locked",
|
|
60
|
+
424 => "Failed Dependency",
|
|
61
|
+
425 => "Too Early",
|
|
62
|
+
426 => "Upgrade Required",
|
|
63
|
+
428 => "Precondition Required",
|
|
64
|
+
429 => "Too Many Requests",
|
|
65
|
+
431 => "Request Header Fields Too Large",
|
|
66
|
+
451 => "Unavailable For Legal Reasons",
|
|
67
|
+
|
|
68
|
+
500 => "Internal Server Error",
|
|
69
|
+
501 => "Not Implemented",
|
|
70
|
+
502 => "Bad Gateway",
|
|
71
|
+
503 => "Service Unavailable",
|
|
72
|
+
504 => "Gateway Timeout",
|
|
73
|
+
505 => "HTTP Version Not Supported",
|
|
74
|
+
506 => "Variant Also Negotiates",
|
|
75
|
+
507 => "Insufficient Storage",
|
|
76
|
+
508 => "Loop Detected",
|
|
77
|
+
510 => "Not Extended",
|
|
78
|
+
511 => "Network Authentication Required",
|
|
79
|
+
}.freeze
|
|
80
|
+
|
|
81
|
+
# Look up the human-readable description for a status code.
|
|
82
|
+
# @parameter code [Integer] The HTTP status code.
|
|
83
|
+
# @returns [String | Nil] The standard description, if known.
|
|
84
|
+
def self.description(code)
|
|
85
|
+
return DESCRIPTIONS[code]
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
end
|
data/lib/protocol/http.rb
CHANGED
data/readme.md
CHANGED
|
@@ -30,6 +30,10 @@ Please see the [project documentation](https://socketry.github.io/protocol-http/
|
|
|
30
30
|
|
|
31
31
|
Please see the [project releases](https://socketry.github.io/protocol-http/releases/index) for all releases.
|
|
32
32
|
|
|
33
|
+
### v0.68.0
|
|
34
|
+
|
|
35
|
+
- Add HTTP status descriptions.
|
|
36
|
+
|
|
33
37
|
### v0.67.0
|
|
34
38
|
|
|
35
39
|
- Parse and resolve HTTP `Range` header values according to the default headers policy.
|
|
@@ -68,10 +72,6 @@ Please see the [project releases](https://socketry.github.io/protocol-http/relea
|
|
|
68
72
|
- Introduce `Protocol::HTTP::Middleware.load` method for loading middleware applications from files.
|
|
69
73
|
- Prevent `ZLib::BufError` when deflating empty chunks by skipping deflation for empty chunks.
|
|
70
74
|
|
|
71
|
-
### v0.58.1
|
|
72
|
-
|
|
73
|
-
- `Protocol::HTTP::DuplicateHeaderError` now includes the existing and new values for better debugging.
|
|
74
|
-
|
|
75
75
|
## See Also
|
|
76
76
|
|
|
77
77
|
- [protocol-http1](https://github.com/socketry/protocol-http1) — HTTP/1 client/server implementation using this
|
data/releases.md
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: protocol-http
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.68.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -113,6 +113,7 @@ files:
|
|
|
113
113
|
- lib/protocol/http/quoted_string.rb
|
|
114
114
|
- lib/protocol/http/request.rb
|
|
115
115
|
- lib/protocol/http/response.rb
|
|
116
|
+
- lib/protocol/http/status.rb
|
|
116
117
|
- lib/protocol/http/version.rb
|
|
117
118
|
- license.md
|
|
118
119
|
- readme.md
|
metadata.gz.sig
CHANGED
|
Binary file
|