async-http 0.56.1 → 0.56.2
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
- data/bake/async/http/h2spec.rb +1 -1
- data/lib/async/http/client.rb +2 -2
- data/lib/async/http/protocol/http1/client.rb +1 -1
- data/lib/async/http/protocol/http2/stream.rb +1 -1
- data/lib/async/http/protocol/https.rb +1 -1
- data/lib/async/http/server.rb +2 -2
- data/lib/async/http/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 550188f639092d3fc62fe8bc1e2120d01a6b316897ea9f43f9a2a4983735969a
|
4
|
+
data.tar.gz: e31110770c986aa3eb756332998b446c1a4d18faeac9cf86886f3c40841f4e24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c944bbbe72788fb06cb49bd68aaf3e17be61df0ad90d330d32e7ac2e3cf6967e190a9923ab3ceb03313fbfea661e5ae963c6ce58f2f02b24b660bc8d6ffd1213
|
7
|
+
data.tar.gz: c71a81cf8c1011a0bb988bf3a809efb354741fb372db561b2331bc973eb4a6e80608d6b689e0d288147a03d965accc2e36aba63edac121cec746149d6acdccbd
|
data/bake/async/http/h2spec.rb
CHANGED
@@ -26,7 +26,7 @@ def server
|
|
26
26
|
|
27
27
|
container = Async::Container.new
|
28
28
|
|
29
|
-
|
29
|
+
Console.logger.info(self){"Starting server..."}
|
30
30
|
|
31
31
|
container.run(count: 1) do
|
32
32
|
server = Async::HTTP::Server.for(endpoint, protocol: Async::HTTP::Protocol::HTTP2, scheme: "https") do |request|
|
data/lib/async/http/client.rb
CHANGED
@@ -83,7 +83,7 @@ module Async
|
|
83
83
|
|
84
84
|
def close
|
85
85
|
while @pool.busy?
|
86
|
-
|
86
|
+
Console.logger.warn(self) {"Waiting for #{@protocol} pool to drain: #{@pool}"}
|
87
87
|
@pool.wait
|
88
88
|
end
|
89
89
|
|
@@ -152,7 +152,7 @@ module Async
|
|
152
152
|
|
153
153
|
def make_pool(connection_limit)
|
154
154
|
Async::Pool::Controller.wrap(limit: connection_limit) do
|
155
|
-
|
155
|
+
Console.logger.debug(self) {"Making connection to #{@endpoint.inspect}"}
|
156
156
|
|
157
157
|
@protocol.client(@endpoint.connect)
|
158
158
|
end
|
@@ -29,7 +29,7 @@ module Async
|
|
29
29
|
class Client < Connection
|
30
30
|
# Used by the client to send requests to the remote server.
|
31
31
|
def call(request, task: Task.current)
|
32
|
-
|
32
|
+
Console.logger.debug(self) {"#{request.method} #{request.path} #{request.headers.inspect}"}
|
33
33
|
|
34
34
|
trailer = request.headers.trailer!
|
35
35
|
|
@@ -59,7 +59,7 @@ module Async
|
|
59
59
|
# alpn_protocol is only available if openssl v1.0.2+
|
60
60
|
name = peer.alpn_protocol
|
61
61
|
|
62
|
-
|
62
|
+
Console.logger.debug(self) {"Negotiating protocol #{name.inspect}..."}
|
63
63
|
|
64
64
|
if protocol = HANDLERS[name]
|
65
65
|
return protocol
|
data/lib/async/http/server.rb
CHANGED
@@ -48,7 +48,7 @@ module Async
|
|
48
48
|
def accept(peer, address, task: Task.current)
|
49
49
|
connection = @protocol.server(peer)
|
50
50
|
|
51
|
-
|
51
|
+
Console.logger.debug(self) {"Incoming connnection from #{address.inspect} to #{@protocol}"}
|
52
52
|
|
53
53
|
connection.each do |request|
|
54
54
|
# We set the default scheme unless it was otherwise specified.
|
@@ -58,7 +58,7 @@ module Async
|
|
58
58
|
# This is a slight optimization to avoid having to get the address from the socket.
|
59
59
|
request.remote_address = address
|
60
60
|
|
61
|
-
#
|
61
|
+
# Console.logger.debug(self) {"Incoming request from #{address.inspect}: #{request.method} #{request.path}"}
|
62
62
|
|
63
63
|
# If this returns nil, we assume that the connection has been hijacked.
|
64
64
|
self.call(request)
|
data/lib/async/http/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: async-http
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.56.
|
4
|
+
version: 0.56.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|
@@ -244,7 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
244
244
|
- !ruby/object:Gem::Version
|
245
245
|
version: '0'
|
246
246
|
requirements: []
|
247
|
-
rubygems_version: 3.
|
247
|
+
rubygems_version: 3.2.3
|
248
248
|
signing_key:
|
249
249
|
specification_version: 4
|
250
250
|
summary: A HTTP client and server library.
|