protocol-http 0.58.0 → 0.58.1
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/error.rb +19 -1
- data/lib/protocol/http/headers.rb +1 -1
- data/lib/protocol/http/version.rb +1 -1
- data/readme.md +4 -4
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +1 -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: e755c82bfe5d9098e7fe898dfb19e6963e500ab9410d9c7d04e2b6eb18886689
|
|
4
|
+
data.tar.gz: 23717c1485024e2f324cc069f7684a924f864a9f57c2a6e62b7be72ba532db45
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a70c2c04344069a17fe6cdf1a5d23dcdaffcfbbfad815937d229c8bdeb7299bef0db2eb45c37e0fec6c1ba8cdf729560ebfcbb261910d630fc2d15d89a7b46a9
|
|
7
|
+
data.tar.gz: fc047716362a83605223b9f0107a652ac8dcaa860c10815dd755c55a7ba73dc4a4ef468212d570e6c37340e6d7bfc3ba85ad6623c1620d38b2bbce57a9e3e4be
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/protocol/http/error.rb
CHANGED
|
@@ -19,12 +19,30 @@ module Protocol
|
|
|
19
19
|
include BadRequest
|
|
20
20
|
|
|
21
21
|
# @parameter key [String] The header key that was duplicated.
|
|
22
|
-
def initialize(key)
|
|
22
|
+
def initialize(key, existing_value, new_value)
|
|
23
23
|
super("Duplicate singleton header key: #{key.inspect}")
|
|
24
|
+
|
|
25
|
+
@key = key
|
|
26
|
+
@existing_value = existing_value
|
|
27
|
+
@new_value = new_value
|
|
24
28
|
end
|
|
25
29
|
|
|
26
30
|
# @attribute [String] key The header key that was duplicated.
|
|
27
31
|
attr :key
|
|
32
|
+
|
|
33
|
+
# @attribute [String] existing_value The existing value for the duplicated header.
|
|
34
|
+
attr :existing_value
|
|
35
|
+
|
|
36
|
+
# @attribute [String] new_value The new value for the duplicated header.
|
|
37
|
+
attr :new_value
|
|
38
|
+
|
|
39
|
+
def detailed_message(highlight: false)
|
|
40
|
+
<<~MESSAGE
|
|
41
|
+
#{self.message}
|
|
42
|
+
Existing value: #{@existing_value.inspect}
|
|
43
|
+
New value: #{@new_value.inspect}
|
|
44
|
+
MESSAGE
|
|
45
|
+
end
|
|
28
46
|
end
|
|
29
47
|
|
|
30
48
|
# Raised when an invalid trailer header is encountered in headers.
|
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.58.1
|
|
34
|
+
|
|
35
|
+
- `Protocol::HTTP::DuplicateHeaderError` now includes the existing and new values for better debugging.
|
|
36
|
+
|
|
33
37
|
### v0.58.0
|
|
34
38
|
|
|
35
39
|
- Move trailer validation to `Headers#add` method to ensure all additions are checked at the time of addition as this is a hard requirement.
|
|
@@ -85,10 +89,6 @@ Please see the [project releases](https://socketry.github.io/protocol-http/relea
|
|
|
85
89
|
|
|
86
90
|
- Drop support for Ruby v3.1.
|
|
87
91
|
|
|
88
|
-
### v0.48.0
|
|
89
|
-
|
|
90
|
-
- Add support for parsing `accept`, `accept-charset`, `accept-encoding` and `accept-language` headers into structured values.
|
|
91
|
-
|
|
92
92
|
## See Also
|
|
93
93
|
|
|
94
94
|
- [protocol-http1](https://github.com/socketry/protocol-http1) — HTTP/1 client/server implementation using this
|
data/releases.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.58.1
|
|
4
|
+
|
|
5
|
+
- `Protocol::HTTP::DuplicateHeaderError` now includes the existing and new values for better debugging.
|
|
6
|
+
|
|
3
7
|
## v0.58.0
|
|
4
8
|
|
|
5
9
|
- Move trailer validation to `Headers#add` method to ensure all additions are checked at the time of addition as this is a hard requirement.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|