async-http 0.99.0 → 0.101.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: 0b6ac145066c1d834e5466282d944564e313852717edd28359de26515a85ead6
4
- data.tar.gz: 1b242251b92b8885392569c591fc0581ea94eba1751f4d2cf8f0c5279c07336e
3
+ metadata.gz: 397ffac9d60c7ff7d3524624cffdfb5105a2cdc1e7a540cc8b282824b5bf890a
4
+ data.tar.gz: fd2cc4a962f28ddb8cb79f4035315816b9a7dd5785e76494b764764f3dd51ef6
5
5
  SHA512:
6
- metadata.gz: 690e9bc0fd0080b7dd98119fdf8876c3f04bd84d4045b727cbdd82735159d314c6852a56a7967949939fe5b7a2182318ef7ec405ffa2d44ce4383c814952abba
7
- data.tar.gz: 2e72385b497dbb1e37bb1a9237f32c963baa886cb6efe35171f78e16a940c74f22f0305f0e5892fdf1a84ade8045194c58da722dcef40213eb2acb30157eb80e
6
+ metadata.gz: 771358b08bcf8ceba72af908b5b5f3d78be7a3751a7051d6350132bb9e942809054da7b2b205169df6eb9e26a49a873743b187df9d0a7d49bc43166db9769519
7
+ data.tar.gz: 998d6fcc02cf5b56f5883d6c26cf3e4a5ca009e2fa1234037c9c2fe4ccabc6262c9b6ede32778a98aabf5e1fd1f9ed3cdae7c9f8613b96338df8bf84ebd36b0c
checksums.yaml.gz.sig CHANGED
Binary file
@@ -70,6 +70,7 @@ module Async
70
70
  # @option hostname [String] the hostname to connect to (or bind to), overrides the URL hostname (used for SNI).
71
71
  # @option port [Integer] the port to bind to, overrides the URL port.
72
72
  # @option ssl_context [OpenSSL::SSL::SSLContext] the context to use for TLS.
73
+ # @option tls_configuration [IO::Endpoint::TLS::Configuration] the transport-neutral TLS configuration.
73
74
  # @option alpn_protocols [Array(String)] the alpn protocols to negotiate.
74
75
  def initialize(url, endpoint = nil, **options)
75
76
  super(**options)
@@ -206,6 +207,11 @@ module Async
206
207
  end
207
208
  end
208
209
 
210
+ # @returns [IO::Endpoint::TLS::Configuration | Nil] The transport-neutral TLS configuration.
211
+ def tls_configuration
212
+ @options[:tls_configuration]
213
+ end
214
+
209
215
  # Build a suitable endpoint, optionally wrapping in TLS for secure connections.
210
216
  # @parameter endpoint [IO::Endpoint::Generic | Nil] An optional underlying endpoint to wrap.
211
217
  # @returns [IO::Endpoint::Generic] The constructed endpoint.
@@ -216,6 +222,7 @@ module Async
216
222
  # Wrap it in SSL:
217
223
  return ::IO::Endpoint::SSLEndpoint.new(endpoint,
218
224
  ssl_context: self.ssl_context,
225
+ tls_configuration: self.tls_configuration,
219
226
  hostname: @url.hostname,
220
227
  timeout: self.timeout,
221
228
  )
@@ -280,6 +287,7 @@ module Async
280
287
  options.delete(:port)
281
288
  options.delete(:hostname)
282
289
  options.delete(:ssl_context)
290
+ options.delete(:tls_configuration)
283
291
  options.delete(:alpn_protocols)
284
292
  options.delete(:protocol)
285
293
 
@@ -161,6 +161,9 @@ module Async
161
161
  # Do not remove this line or you will unleash the gods of concurrency hell.
162
162
  task.yield
163
163
  end
164
+ rescue ::Protocol::HTTP::RemoteError => error
165
+ Console.debug(self, "Remote endpoint disconnected!", exception: error)
166
+ return
164
167
  rescue => error
165
168
  # We store error (as a local variable) for later use in the ensure block.
166
169
  raise
@@ -7,6 +7,6 @@
7
7
  module Async
8
8
  # @namespace
9
9
  module HTTP
10
- VERSION = "0.99.0"
10
+ VERSION = "0.101.0"
11
11
  end
12
12
  end
data/readme.md CHANGED
@@ -16,6 +16,14 @@ 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.101.0
20
+
21
+ - Handle remote disconnects in `Async::HTTP::Protocol::HTTP1::Server#each` without reporting them as server failures.
22
+
23
+ ### v0.100.0
24
+
25
+ - Added transport-neutral TLS configuration support to `Async::HTTP::Endpoint`.
26
+
19
27
  ### v0.99.0
20
28
 
21
29
  - Retry safe requests when a remote HTTP/2 endpoint resets the stream with `INTERNAL_ERROR` before returning a response.
@@ -51,14 +59,6 @@ Please see the [project releases](https://socketry.github.io/async-http/releases
51
59
 
52
60
  - Fix response body leak in HTTP/2 server when stream is reset before `send_response` completes (e.g. client-side gRPC cancellation). The response body's `close` was never called, leaking any resources tied to body lifecycle (such as `rack.response_finished` callbacks and utilization metrics).
53
61
 
54
- ### v0.94.1
55
-
56
- - Fix `defer_stop` usage in `HTTP1::Server`, improving server graceful shutdown behavior.
57
-
58
- ### v0.94.0
59
-
60
- - Propagate all errors from background reader to active streams so that they are closed correctly (e.g. errors are not missed).
61
-
62
62
  ## See Also
63
63
 
64
64
  - [benchmark-http](https://github.com/socketry/benchmark-http) — A benchmarking tool to report on web server concurrency.
data/releases.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Releases
2
2
 
3
+ ## v0.101.0
4
+
5
+ - Handle remote disconnects in `Async::HTTP::Protocol::HTTP1::Server#each` without reporting them as server failures.
6
+
7
+ ## v0.100.0
8
+
9
+ - Added transport-neutral TLS configuration support to `Async::HTTP::Endpoint`.
10
+
3
11
  ## v0.99.0
4
12
 
5
13
  - Retry safe requests when a remote HTTP/2 endpoint resets the stream with `INTERNAL_ERROR` before returning a response.
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.99.0
4
+ version: 0.101.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -96,14 +96,14 @@ dependencies:
96
96
  requirements:
97
97
  - - "~>"
98
98
  - !ruby/object:Gem::Version
99
- version: '0.14'
99
+ version: '0.18'
100
100
  type: :runtime
101
101
  prerelease: false
102
102
  version_requirements: !ruby/object:Gem::Requirement
103
103
  requirements:
104
104
  - - "~>"
105
105
  - !ruby/object:Gem::Version
106
- version: '0.14'
106
+ version: '0.18'
107
107
  - !ruby/object:Gem::Dependency
108
108
  name: io-stream
109
109
  requirement: !ruby/object:Gem::Requirement
@@ -138,14 +138,14 @@ dependencies:
138
138
  requirements:
139
139
  - - "~>"
140
140
  - !ruby/object:Gem::Version
141
- version: '0.39'
141
+ version: '0.41'
142
142
  type: :runtime
143
143
  prerelease: false
144
144
  version_requirements: !ruby/object:Gem::Requirement
145
145
  requirements:
146
146
  - - "~>"
147
147
  - !ruby/object:Gem::Version
148
- version: '0.39'
148
+ version: '0.41'
149
149
  - !ruby/object:Gem::Dependency
150
150
  name: protocol-http2
151
151
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file