protocol-http2 0.24.0 → 0.25.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 163e984c0ac8a9a19c5dd3fd4f09c7b4be35622413a562ff80f14dece63f86e3
4
- data.tar.gz: 5329a5966f521513c7bc275a426c42264aa2fcc5078b39dbb0c84945cf18240b
3
+ metadata.gz: b8f43f3f03b10cd9477abc3b46090c9e8902eda24994ee6b7ded6d5ee801895d
4
+ data.tar.gz: f72cb844993482f485cbb713e4c71d08cb1a9b83bef2d9551f9db7e754d7a34b
5
5
  SHA512:
6
- metadata.gz: 301bdf39a174d8db27486c568abf7c01926ed0c290502e3580500a461e6e6e5ac296630b4dce3c56207f314ee5bab29d7ff18eead4ad54d5ea2326043a70f118
7
- data.tar.gz: 58f22287bd88d4c2844d1742ecbc2bf57f8640ec6b35400ade3aa565101715c1282ed59d354b8a3c5c77103e83f87ce3764865ea5ff335721f63a14bcf527c48
6
+ metadata.gz: c6b7113982c91dcd97920ce8c44330093c3cd90f2d1623928333e5c5ebbf09358b678452cda940f0645da5a1bbe7f1a1b6dc155344913cdee1dafd14b33f2f75
7
+ data.tar.gz: bdae54364a9e64218bb10c20112ffc6b3511098b68c305a06c8789ecabcfe1d62d2954ba1bee0451fea5014313f1d7e0c782dd49127986c632b87b9890195902
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::RequestRefusedError.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)
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2025, by Samuel Williams.
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.24.0"
10
+ VERSION = "0.25.0"
11
11
  end
12
12
  end
data/readme.md CHANGED
@@ -14,6 +14,10 @@ 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.25.0
18
+
19
+ - On GOAWAY, proactively close unprocessed streams (ID above `last_stream_id`) with `Protocol::HTTP::RequestRefusedError`, enabling safe retry of non-idempotent requests.
20
+
17
21
  ### v0.24.0
18
22
 
19
23
  - 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.
@@ -57,11 +61,6 @@ Please see the [project releases](https://socketry.github.io/protocol-http2/rele
57
61
  - Added traces to framer for better debugging and monitoring capabilities.
58
62
  - Minor fixes to logging output.
59
63
 
60
- ### v0.19.1
61
-
62
- - Performance improvements for synchronized output handling.
63
- - Extracted `window.rb` into separate module for better organization.
64
-
65
64
  ## See Also
66
65
 
67
66
  - [Async::HTTP](https://github.com/socketry/async-http) - A high-level HTTP client and server implementation.
@@ -76,6 +75,22 @@ We welcome contributions to this project.
76
75
  4. Push to the branch (`git push origin my-new-feature`).
77
76
  5. Create new Pull Request.
78
77
 
78
+ ### Running Tests
79
+
80
+ To run the test suite:
81
+
82
+ ``` shell
83
+ bundle exec sus
84
+ ```
85
+
86
+ ### Making Releases
87
+
88
+ To make a new release:
89
+
90
+ ``` shell
91
+ bundle exec bake gem:release:patch # or minor or major
92
+ ```
93
+
79
94
  ### Developer Certificate of Origin
80
95
 
81
96
  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,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.25.0
4
+
5
+ - On GOAWAY, proactively close unprocessed streams (ID above `last_stream_id`) with `Protocol::HTTP::RequestRefusedError`, enabling safe retry of non-idempotent requests.
6
+
3
7
  ## v0.24.0
4
8
 
5
9
  - 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.24.0
4
+ version: 0.25.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.47'
65
+ version: '0.61'
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.47'
72
+ version: '0.61'
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.2'
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.3
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