protocol-http2 0.24.0 → 0.26.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/http2/connection.rb +9 -0
- data/lib/protocol/http2/stream.rb +5 -1
- data/lib/protocol/http2/version.rb +2 -2
- data/readme.md +24 -10
- data/releases.md +8 -0
- data.tar.gz.sig +0 -0
- metadata +5 -5
- 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: 79326887f1adad2dd75f4d18db606e315f00f67fdc1d402bc301750a4dbd5ffb
|
|
4
|
+
data.tar.gz: 03aa0c871daec5f5cc4a96e6c74b794b1521f1d31aac3e3b3ee51ab5ec6eb4ee
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: aa3a73466c2fe93bf092fb225e67a60fa861a6225e2234cc71e620651d8900b6344546cc7aa834bb7ccda6a7bfe62c09c329215bbe7b7abe3661c7a3c9c57baf
|
|
7
|
+
data.tar.gz: 6d22ca63b5db8bb4e08b5dac9c9b19e3949bd148f47c48b786cd51b176ddb9d67d58a961cba51939c6d78572e8338f88b2c38f61f2eb0a61165afff84224cef5
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -237,6 +237,15 @@ module Protocol
|
|
|
237
237
|
|
|
238
238
|
self.close!
|
|
239
239
|
|
|
240
|
+
# Streams above the last stream ID were not processed by the remote peer and are safe to retry (RFC 9113 §6.8).
|
|
241
|
+
error = ::Protocol::HTTP::RefusedError.new("GOAWAY: request not processed.")
|
|
242
|
+
|
|
243
|
+
@streams.each_value do |stream|
|
|
244
|
+
if stream.id > @remote_stream_id
|
|
245
|
+
stream.close(error)
|
|
246
|
+
end
|
|
247
|
+
end
|
|
248
|
+
|
|
240
249
|
if error_code != 0
|
|
241
250
|
# Shut down immediately.
|
|
242
251
|
raise GoawayError.new(message, error_code)
|
|
@@ -250,7 +250,11 @@ module Protocol
|
|
|
250
250
|
@connection.delete(@id)
|
|
251
251
|
|
|
252
252
|
if error_code
|
|
253
|
-
|
|
253
|
+
if error_code == REFUSED_STREAM
|
|
254
|
+
error = ::Protocol::HTTP::RefusedError.new("Stream refused.")
|
|
255
|
+
else
|
|
256
|
+
error = StreamError.new("Stream closed!", error_code)
|
|
257
|
+
end
|
|
254
258
|
end
|
|
255
259
|
|
|
256
260
|
self.closed(error)
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# frozen_string_literal: true
|
|
2
2
|
|
|
3
3
|
# Released under the MIT License.
|
|
4
|
-
# Copyright, 2019-
|
|
4
|
+
# Copyright, 2019-2026, by Samuel Williams.
|
|
5
5
|
|
|
6
6
|
# @namespace
|
|
7
7
|
module Protocol
|
|
8
8
|
# @namespace
|
|
9
9
|
module HTTP2
|
|
10
|
-
VERSION = "0.
|
|
10
|
+
VERSION = "0.26.0"
|
|
11
11
|
end
|
|
12
12
|
end
|
data/readme.md
CHANGED
|
@@ -14,6 +14,14 @@ Please see the [project documentation](https://socketry.github.io/protocol-http2
|
|
|
14
14
|
|
|
15
15
|
Please see the [project releases](https://socketry.github.io/protocol-http2/releases/index) for all releases.
|
|
16
16
|
|
|
17
|
+
### v0.26.0
|
|
18
|
+
|
|
19
|
+
- On RST\_STREAM with REFUSED\_STREAM, close the stream with `Protocol::HTTP::RefusedError` instead of `StreamError`.
|
|
20
|
+
|
|
21
|
+
### v0.25.0
|
|
22
|
+
|
|
23
|
+
- On GOAWAY, proactively close unprocessed streams (ID above `last_stream_id`) with `Protocol::HTTP::RequestRefusedError`, enabling safe retry of non-idempotent requests.
|
|
24
|
+
|
|
17
25
|
### v0.24.0
|
|
18
26
|
|
|
19
27
|
- When closing a connection with active streams, if an error is not provided, it will default to `EOFError` so that streams propagate the closure correctly.
|
|
@@ -52,16 +60,6 @@ Please see the [project releases](https://socketry.github.io/protocol-http2/rele
|
|
|
52
60
|
- Improved window update frame handling and performance optimizations.
|
|
53
61
|
- Better implementation of `Window#inspect` for debugging.
|
|
54
62
|
|
|
55
|
-
### v0.19.2
|
|
56
|
-
|
|
57
|
-
- Added traces to framer for better debugging and monitoring capabilities.
|
|
58
|
-
- Minor fixes to logging output.
|
|
59
|
-
|
|
60
|
-
### v0.19.1
|
|
61
|
-
|
|
62
|
-
- Performance improvements for synchronized output handling.
|
|
63
|
-
- Extracted `window.rb` into separate module for better organization.
|
|
64
|
-
|
|
65
63
|
## See Also
|
|
66
64
|
|
|
67
65
|
- [Async::HTTP](https://github.com/socketry/async-http) - A high-level HTTP client and server implementation.
|
|
@@ -76,6 +74,22 @@ We welcome contributions to this project.
|
|
|
76
74
|
4. Push to the branch (`git push origin my-new-feature`).
|
|
77
75
|
5. Create new Pull Request.
|
|
78
76
|
|
|
77
|
+
### Running Tests
|
|
78
|
+
|
|
79
|
+
To run the test suite:
|
|
80
|
+
|
|
81
|
+
``` shell
|
|
82
|
+
bundle exec sus
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Making Releases
|
|
86
|
+
|
|
87
|
+
To make a new release:
|
|
88
|
+
|
|
89
|
+
``` shell
|
|
90
|
+
bundle exec bake gem:release:patch # or minor or major
|
|
91
|
+
```
|
|
92
|
+
|
|
79
93
|
### Developer Certificate of Origin
|
|
80
94
|
|
|
81
95
|
In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.26.0
|
|
4
|
+
|
|
5
|
+
- On RST\_STREAM with REFUSED\_STREAM, close the stream with `Protocol::HTTP::RefusedError` instead of `StreamError`.
|
|
6
|
+
|
|
7
|
+
## v0.25.0
|
|
8
|
+
|
|
9
|
+
- On GOAWAY, proactively close unprocessed streams (ID above `last_stream_id`) with `Protocol::HTTP::RequestRefusedError`, enabling safe retry of non-idempotent requests.
|
|
10
|
+
|
|
3
11
|
## v0.24.0
|
|
4
12
|
|
|
5
13
|
- When closing a connection with active streams, if an error is not provided, it will default to `EOFError` so that streams propagate the closure correctly.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: protocol-http2
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.26.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -62,14 +62,14 @@ dependencies:
|
|
|
62
62
|
requirements:
|
|
63
63
|
- - "~>"
|
|
64
64
|
- !ruby/object:Gem::Version
|
|
65
|
-
version: '0.
|
|
65
|
+
version: '0.62'
|
|
66
66
|
type: :runtime
|
|
67
67
|
prerelease: false
|
|
68
68
|
version_requirements: !ruby/object:Gem::Requirement
|
|
69
69
|
requirements:
|
|
70
70
|
- - "~>"
|
|
71
71
|
- !ruby/object:Gem::Version
|
|
72
|
-
version: '0.
|
|
72
|
+
version: '0.62'
|
|
73
73
|
executables: []
|
|
74
74
|
extensions: []
|
|
75
75
|
extra_rdoc_files: []
|
|
@@ -116,14 +116,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
116
116
|
requirements:
|
|
117
117
|
- - ">="
|
|
118
118
|
- !ruby/object:Gem::Version
|
|
119
|
-
version: '3.
|
|
119
|
+
version: '3.3'
|
|
120
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
121
121
|
requirements:
|
|
122
122
|
- - ">="
|
|
123
123
|
- !ruby/object:Gem::Version
|
|
124
124
|
version: '0'
|
|
125
125
|
requirements: []
|
|
126
|
-
rubygems_version: 4.0.
|
|
126
|
+
rubygems_version: 4.0.6
|
|
127
127
|
specification_version: 4
|
|
128
128
|
summary: A low level implementation of the HTTP/2 protocol.
|
|
129
129
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|