protocol-http 0.62.0 → 0.62.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9f4bf9ac69b32d6d157fd1398af71f7f6830d2a01ae7a97a9b8a7814e27721f
4
- data.tar.gz: f9e814e1f3be6e12ff82b0d091c478cc87897eff1189eeba29e52e3b4f4c4d92
3
+ metadata.gz: 7001e45d0dbfe4930b402647f4f535fe005acb099b8b676be3e3688ebb53ab7e
4
+ data.tar.gz: a6cef93b8b627842ba8a7dd055e4c98ef4f883526259eddf09801c433ce7487a
5
5
  SHA512:
6
- metadata.gz: 250ec533ff70f9df98815bfe61c98b87f0bbfdbdc77a83844c18a166baee156f5cdea46476fbc828accb2569a48c0a5647a63f5b6aec53e76f1e92b52e2301dd
7
- data.tar.gz: 65d87fff6702f96fea8b90ca448e71ada4f652555d6386d2d99ba1ff7956a846851ffcbf087c9ffdae3a1feed303c9893211df4f954cac5f6209a90a75037bde
6
+ metadata.gz: 16070db2e11451b34f6a07d67e60dd4586b1ee88982b76533efe8900803c697537c80cf63499c6bfaca990a3cf4c1fdddc3a06601a16a8dd555a07b56892900b
7
+ data.tar.gz: b2ae450a0a6e1dd59235735e6ccd0705d618cdd9027eb6f56bf25a28c065678e8b60a1cf9e2fbe8471faa373b7eab344b490819bed2d06ba73a189f9e43a32fc
checksums.yaml.gz.sig CHANGED
Binary file
@@ -52,9 +52,11 @@ 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 "" if length == 0
55
+ if length == 0
56
+ return (buffer ? buffer.clear : String.new(encoding: Encoding::BINARY))
57
+ end
56
58
 
57
- buffer ||= String.new.force_encoding(Encoding::BINARY)
59
+ buffer ||= String.new(encoding: Encoding::BINARY)
58
60
 
59
61
  # Take any previously buffered data and replace it into the given buffer.
60
62
  if @buffer
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module HTTP
8
- VERSION = "0.62.0"
8
+ VERSION = "0.62.2"
9
9
  end
10
10
  end
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.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
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.
@@ -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,5 +1,9 @@
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
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.
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.62.0
4
+ version: 0.62.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file