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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/http/endpoint.rb +8 -0
- data/lib/async/http/protocol/http1/server.rb +3 -0
- data/lib/async/http/version.rb +1 -1
- data/readme.md +8 -8
- 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: 397ffac9d60c7ff7d3524624cffdfb5105a2cdc1e7a540cc8b282824b5bf890a
|
|
4
|
+
data.tar.gz: fd2cc4a962f28ddb8cb79f4035315816b9a7dd5785e76494b764764f3dd51ef6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 771358b08bcf8ceba72af908b5b5f3d78be7a3751a7051d6350132bb9e942809054da7b2b205169df6eb9e26a49a873743b187df9d0a7d49bc43166db9769519
|
|
7
|
+
data.tar.gz: 998d6fcc02cf5b56f5883d6c26cf3e4a5ca009e2fa1234037c9c2fe4ccabc6262c9b6ede32778a98aabf5e1fd1f9ed3cdae7c9f8613b96338df8bf84ebd36b0c
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/lib/async/http/endpoint.rb
CHANGED
|
@@ -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
|
data/lib/async/http/version.rb
CHANGED
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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.
|
|
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
|