async-http 0.102.0 → 0.103.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: 39dbd69fca4e67586111ac9fc21231b0a4aff0ade936468c8851707004d9c456
4
- data.tar.gz: c10435cb4d54c2220170624931c87ed77302eb01ff8c9b70a89c22bc56c551cb
3
+ metadata.gz: b10e0a0b71a5a8dab4c5797c4060e7876225c98021c4a4bd9da1512651617cdc
4
+ data.tar.gz: 1aa97a7f3c4733590d3a9c14cf7a6955a74e68f9bd31bed6d60c29809bde22a6
5
5
  SHA512:
6
- metadata.gz: 0367722b925fb45a0517f1890aac1b724aa025d9db58843f034e8b9cc03ffb18044398a442b6ffff92cd4e0ac0a04773730c22384a21640521865e4dd3858993
7
- data.tar.gz: 7602b933368edfdbc7e812fab78193a5436ed7a95de8214ecc3ba42618e7c20c2b26c10309c6609952381992387c23d2f4a5ff30b7bff25dd4a315055fd5d24d
6
+ metadata.gz: fc0c54c2381886bed22f5be1a67368048ae0d14bf5dc32f03eafd141e7206fbbd7f7e89ea363f8b714ab89539a93b11f2c0990f2f90a70ad184f94b86e46a656
7
+ data.tar.gz: 13f57aaada7b36adae21619b08fb7bb48897e665f4810bb8cff66a627719102d21ba6e0695d08fc3affe3f5ce0c15119603a1b1a940c7472ffdef78319b549f4
checksums.yaml.gz.sig CHANGED
Binary file
@@ -129,10 +129,9 @@ module Async
129
129
  @response = nil
130
130
  end
131
131
 
132
- if error
132
+ unless @ready.resolved?
133
+ error ||= EOFError.new("Stream closed before response headers were received!")
133
134
  @ready.reject(error)
134
- else
135
- @ready.resolve(nil)
136
135
  end
137
136
  end
138
137
  end
@@ -210,10 +210,7 @@ module Async
210
210
  # - A frame is sent which causes this stream to enter the closed state. This method will be invoked from that task.
211
211
  # While the input stream is relatively straight forward, the output stream can trigger the second case above
212
212
  def closed(error)
213
- orderly_reset = error.is_a?(::Protocol::HTTP2::StreamError) &&
214
- error.code == ::Protocol::HTTP2::Error::NO_ERROR
215
-
216
- if orderly_reset
213
+ if error.is_a?(::Protocol::HTTP2::StreamError) && error.code == ::Protocol::HTTP2::Error::NO_ERROR
217
214
  error = nil
218
215
  end
219
216
 
@@ -227,10 +224,10 @@ module Async
227
224
  if output = @output
228
225
  @output = nil
229
226
 
230
- if orderly_reset
231
- output.close_stream
232
- else
227
+ if error
233
228
  output.stop(error)
229
+ else
230
+ output.close_stream
234
231
  end
235
232
  end
236
233
 
@@ -7,6 +7,6 @@
7
7
  module Async
8
8
  # @namespace
9
9
  module HTTP
10
- VERSION = "0.102.0"
10
+ VERSION = "0.103.0"
11
11
  end
12
12
  end
data/readme.md CHANGED
@@ -20,6 +20,10 @@ Please see the [project documentation](https://socketry.github.io/async-http/) f
20
20
 
21
21
  Please see the [project releases](https://socketry.github.io/async-http/releases/index) for all releases.
22
22
 
23
+ ### v0.103.0
24
+
25
+ - Handle `RST_STREAM(NO_ERROR)` as an orderly HTTP/2 stream closure while still failing requests whose streams close before any response headers are received.
26
+
23
27
  ### v0.102.0
24
28
 
25
29
  - Requests assigned to an HTTP/2 connection which has already closed are refused before being written, allowing them to be retried safely.
@@ -57,13 +61,6 @@ Please see the [project releases](https://socketry.github.io/async-http/releases
57
61
 
58
62
  - Fix handling of reset stream causing complete connection failure.
59
63
 
60
- ### v0.95.0
61
-
62
- - Use `Protocol::HTTP::RefusedError` for safe retry of requests not processed by the server, including non-idempotent methods like PUT.
63
- - Remove `Async::HTTP::Protocol::RequestFailed` in favour of `Protocol::HTTP::RefusedError`.
64
- - HTTP/1: Delegate request write failure handling to `protocol-http1`.
65
- - HTTP/2: Handle GOAWAY and REFUSED\_STREAM via `protocol-http2`, enabling automatic retry of unprocessed requests.
66
-
67
64
  ## See Also
68
65
 
69
66
  - [benchmark-http](https://github.com/socketry/benchmark-http) — A benchmarking tool to report on web server concurrency.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.103.0
4
+
5
+ - Handle `RST_STREAM(NO_ERROR)` as an orderly HTTP/2 stream closure while still failing requests whose streams close before any response headers are received.
6
+
3
7
  ## v0.102.0
4
8
 
5
9
  - Requests assigned to an HTTP/2 connection which has already closed are refused before being written, allowing them to be retried safely.
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.102.0
4
+ version: 0.103.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -153,14 +153,14 @@ dependencies:
153
153
  requirements:
154
154
  - - "~>"
155
155
  - !ruby/object:Gem::Version
156
- version: '0.27'
156
+ version: '0.28'
157
157
  type: :runtime
158
158
  prerelease: false
159
159
  version_requirements: !ruby/object:Gem::Requirement
160
160
  requirements:
161
161
  - - "~>"
162
162
  - !ruby/object:Gem::Version
163
- version: '0.27'
163
+ version: '0.28'
164
164
  - !ruby/object:Gem::Dependency
165
165
  name: protocol-url
166
166
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file