async-http 0.84.0 → 0.86.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: fae68a892d4448878c877c8a55a286bdc40232d2e3a540440e5a0f70d28080d1
4
- data.tar.gz: dcac4fb82713b2fbbc40719cb10bd343cae141a2acb9c0265fc975c2cd5f4b22
3
+ metadata.gz: ea4e711204ad0a9af1e1e635a4ce7248683ae570e783bd8648e9d8e9c8c21b9c
4
+ data.tar.gz: 14dd2e09b46342b06aebf142f40d8c75aa864cee62df950452ef07e47ec2e7e0
5
5
  SHA512:
6
- metadata.gz: cb3480dd0f93f656527e8cce0b3b4fa8fd8069dbf34075cee3dc0b3783aff34adb5b3e727cdd11c2ef19c5f1a17833e57209777e4c580b4ba896dc1c8e263114
7
- data.tar.gz: 20ecff2bb46bd105740f786131d98b56537ad33a4cd9c1a51251c002cc43174f4182feaa9f57fa4aee33eaaa71e6c20bf29caacef5fa4f7b360e07d27cf1cb35
6
+ metadata.gz: 7b667f21701e3e9f6d77f7af842b2540c979ebefe9f94a07fda2eb617e5e1327621d51fc7c0caf6e97245228db09d42a2850f2a96c94c3fbc62683837c4995cc
7
+ data.tar.gz: 256a13cfc5fd2f3cef207086902893d4ec5753d44af7ae0422c12636cb756b7ca27fe498d2810fe3757d84e5470157900c8d9be51a714e457a0f1f18342dd193
checksums.yaml.gz.sig CHANGED
Binary file
@@ -37,6 +37,8 @@ module Async
37
37
  @guard.synchronize do
38
38
  @window_updated.signal
39
39
  end
40
+
41
+ return true
40
42
  end
41
43
 
42
44
  def write(chunk)
@@ -112,7 +112,7 @@ module Async
112
112
 
113
113
  def send_response(response)
114
114
  if response.nil?
115
- return @stream.send_headers(nil, NO_RESPONSE, ::Protocol::HTTP2::END_STREAM)
115
+ return @stream.send_headers(NO_RESPONSE, ::Protocol::HTTP2::END_STREAM)
116
116
  end
117
117
 
118
118
  protocol_headers = [
@@ -129,14 +129,14 @@ module Async
129
129
  # This function informs the headers object that any subsequent headers are going to be trailer. Therefore, it must be called *before* sending the headers, to avoid any race conditions.
130
130
  trailer = response.headers.trailer!
131
131
 
132
- @stream.send_headers(nil, headers)
132
+ @stream.send_headers(headers)
133
133
 
134
134
  @stream.send_body(body, trailer)
135
135
  else
136
136
  # Ensure the response body is closed if we are ending the stream:
137
137
  response.close
138
138
 
139
- @stream.send_headers(nil, headers, ::Protocol::HTTP2::END_STREAM)
139
+ @stream.send_headers(headers, ::Protocol::HTTP2::END_STREAM)
140
140
  end
141
141
  end
142
142
 
@@ -149,7 +149,7 @@ module Async
149
149
  interim_response_headers = ::Protocol::HTTP::Headers::Merged.new(interim_response_headers, headers)
150
150
  end
151
151
 
152
- @stream.send_headers(nil, interim_response_headers)
152
+ @stream.send_headers(interim_response_headers)
153
153
  end
154
154
  end
155
155
  end
@@ -222,7 +222,7 @@ module Async
222
222
  )
223
223
 
224
224
  if request.body.nil?
225
- @stream.send_headers(nil, headers, ::Protocol::HTTP2::END_STREAM)
225
+ @stream.send_headers(headers, ::Protocol::HTTP2::END_STREAM)
226
226
  else
227
227
  if length = request.body.length
228
228
  # This puts it at the end of the pseudo-headers:
@@ -233,7 +233,7 @@ module Async
233
233
  trailer = request.headers.trailer!
234
234
 
235
235
  begin
236
- @stream.send_headers(nil, headers)
236
+ @stream.send_headers(headers)
237
237
  rescue
238
238
  raise RequestFailed
239
239
  end
@@ -131,7 +131,7 @@ module Async
131
131
  else
132
132
  # Write trailer?
133
133
  if trailer&.any?
134
- send_headers(nil, trailer, ::Protocol::HTTP2::END_STREAM)
134
+ send_headers(trailer, ::Protocol::HTTP2::END_STREAM)
135
135
  else
136
136
  send_data(nil, ::Protocol::HTTP2::END_STREAM)
137
137
  end
@@ -142,6 +142,8 @@ module Async
142
142
  super
143
143
 
144
144
  @output&.window_updated(size)
145
+
146
+ return true
145
147
  end
146
148
 
147
149
  # When the stream transitions to the closed state, this method is called. There are roughly two ways this can happen:
@@ -27,6 +27,7 @@ module Async
27
27
  ::Protocol::HTTP2::Settings::ENABLE_PUSH => 0,
28
28
  ::Protocol::HTTP2::Settings::MAXIMUM_FRAME_SIZE => 0x100000,
29
29
  ::Protocol::HTTP2::Settings::INITIAL_WINDOW_SIZE => 0x800000,
30
+ ::Protocol::HTTP2::Settings::NO_RFC7540_PRIORITIES => 1,
30
31
  }
31
32
 
32
33
  SERVER_SETTINGS = {
@@ -35,6 +36,7 @@ module Async
35
36
  ::Protocol::HTTP2::Settings::MAXIMUM_FRAME_SIZE => 0x100000,
36
37
  ::Protocol::HTTP2::Settings::INITIAL_WINDOW_SIZE => 0x800000,
37
38
  ::Protocol::HTTP2::Settings::ENABLE_CONNECT_PROTOCOL => 1,
39
+ ::Protocol::HTTP2::Settings::NO_RFC7540_PRIORITIES => 1,
38
40
  }
39
41
 
40
42
  def self.client(peer, settings = CLIENT_SETTINGS)
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module HTTP
8
- VERSION = "0.84.0"
8
+ VERSION = "0.86.0"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -16,6 +16,10 @@ Please see the [project documentation](https://socketry.github.io/async-http/) f
16
16
 
17
17
  Please see the [project releases](https://socketry.github.io/async-http/releases/index) for all releases.
18
18
 
19
+ ### v0.86.0
20
+
21
+ - Add support for HTTP/2 `NO_RFC7540_PRIORITIES`. See <https://www.rfc-editor.org/rfc/rfc9218.html> for more details.
22
+
19
23
  ### v0.84.0
20
24
 
21
25
  - Minor consistency fixes to `Async::HTTP::Internet` singleton methods.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.86.0
4
+
5
+ - Add support for HTTP/2 `NO_RFC7540_PRIORITIES`. See <https://www.rfc-editor.org/rfc/rfc9218.html> for more details.
6
+
3
7
  ## v0.84.0
4
8
 
5
9
  - Minor consistency fixes to `Async::HTTP::Internet` singleton methods.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.84.0
4
+ version: 0.86.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -58,7 +58,7 @@ cert_chain:
58
58
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
59
59
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
60
60
  -----END CERTIFICATE-----
61
- date: 2024-11-24 00:00:00.000000000 Z
61
+ date: 2024-12-01 00:00:00.000000000 Z
62
62
  dependencies:
63
63
  - !ruby/object:Gem::Dependency
64
64
  name: async
@@ -150,14 +150,14 @@ dependencies:
150
150
  requirements:
151
151
  - - "~>"
152
152
  - !ruby/object:Gem::Version
153
- version: '0.19'
153
+ version: '0.22'
154
154
  type: :runtime
155
155
  prerelease: false
156
156
  version_requirements: !ruby/object:Gem::Requirement
157
157
  requirements:
158
158
  - - "~>"
159
159
  - !ruby/object:Gem::Version
160
- version: '0.19'
160
+ version: '0.22'
161
161
  - !ruby/object:Gem::Dependency
162
162
  name: traces
163
163
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file