protocol-http 0.61.0 → 0.62.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/body/stream.rb +1 -1
- data/lib/protocol/http/error.rb +6 -2
- data/lib/protocol/http/version.rb +1 -1
- data/readme.md +5 -6
- data/releases.md +5 -1
- 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: 7eaa0d9299bfac4824085a779deb8e2764bc650765cda32fba75285e16e76841
|
|
4
|
+
data.tar.gz: 0e7c464e04570d7634ddd1aae9bc9a2d3757b76ca855779ab49abb045ebd7da4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1865071baeceac8961adb366ba4b9148ccb07b730794a3a094980ad8134eac9b22b3ff0a1cc31cda148f6cfcebddfb039651b4db3dc2481dc341f627aacdeea1
|
|
7
|
+
data.tar.gz: c09a5f5e8fbb8bad7f762c9140f87dcd304b980a907c97e648659579f6a9f6514dc4a52d09779512e5eab519b7e51165239443d225e7729b095109f9524e22ea
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -52,7 +52,7 @@ module Protocol
|
|
|
52
52
|
# @parameter buffer [String] the buffer which will receive the data
|
|
53
53
|
# @returns [String] a buffer containing the data
|
|
54
54
|
def read(length = nil, buffer = nil)
|
|
55
|
-
return
|
|
55
|
+
return (buffer ? buffer.clear : String.new) if length == 0
|
|
56
56
|
|
|
57
57
|
buffer ||= String.new.force_encoding(Encoding::BINARY)
|
|
58
58
|
|
data/lib/protocol/http/error.rb
CHANGED
|
@@ -9,10 +9,14 @@ module Protocol
|
|
|
9
9
|
class Error < StandardError
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
-
# Raised when
|
|
13
|
-
|
|
12
|
+
# Raised when an HTTP stream or request was refused before any processing occurred.
|
|
13
|
+
# In the case of requests, it indicates that the request was refused before any processing occurred, and can be safely retried.
|
|
14
|
+
class RefusedError < Error
|
|
14
15
|
end
|
|
15
16
|
|
|
17
|
+
# @deprecated Use {RefusedError} instead.
|
|
18
|
+
RequestRefusedError = RefusedError
|
|
19
|
+
|
|
16
20
|
# Represents a bad request error (as opposed to a server error).
|
|
17
21
|
# This is used to indicate that the request was malformed or invalid.
|
|
18
22
|
module BadRequest
|
data/readme.md
CHANGED
|
@@ -30,9 +30,13 @@ 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.62.1
|
|
34
|
+
|
|
35
|
+
- Fix handling of `Stream#read(0)`, it must return a mutable string (or clear the given buffer).
|
|
36
|
+
|
|
33
37
|
### v0.61.0
|
|
34
38
|
|
|
35
|
-
- Introduce `Protocol::HTTP::
|
|
39
|
+
- Introduce `Protocol::HTTP::RefusedError` for indicating a stream or request was refused before processing and can be safely retried. `RequestRefusedError` is provided as an alias for backwards compatibility.
|
|
36
40
|
|
|
37
41
|
### v0.60.0
|
|
38
42
|
|
|
@@ -81,11 +85,6 @@ Please see the [project releases](https://socketry.github.io/protocol-http/relea
|
|
|
81
85
|
- Introduce rich support for `Header::Digest`, `Header::ServerTiming`, `Header::TE`, `Header::Trailer` and `Header::TransferEncoding`.
|
|
82
86
|
- [Improved HTTP Trailer Security](https://socketry.github.io/protocol-http/releases/index#improved-http-trailer-security)
|
|
83
87
|
|
|
84
|
-
### v0.53.0
|
|
85
|
-
|
|
86
|
-
- Improve consistency of Body `#inspect`.
|
|
87
|
-
- Improve `as_json` support for Body wrappers.
|
|
88
|
-
|
|
89
88
|
## See Also
|
|
90
89
|
|
|
91
90
|
- [protocol-http1](https://github.com/socketry/protocol-http1) — HTTP/1 client/server implementation using this
|
data/releases.md
CHANGED
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.62.1
|
|
4
|
+
|
|
5
|
+
- Fix handling of `Stream#read(0)`, it must return a mutable string (or clear the given buffer).
|
|
6
|
+
|
|
3
7
|
## v0.61.0
|
|
4
8
|
|
|
5
|
-
- Introduce `Protocol::HTTP::
|
|
9
|
+
- Introduce `Protocol::HTTP::RefusedError` for indicating a stream or request was refused before processing and can be safely retried. `RequestRefusedError` is provided as an alias for backwards compatibility.
|
|
6
10
|
|
|
7
11
|
## v0.60.0
|
|
8
12
|
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|