async-http 0.44.0 → 0.45.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/async-http.gemspec +1 -1
- data/lib/async/http/protocol/http2/client.rb +5 -4
- data/lib/async/http/protocol/http2/request.rb +8 -8
- data/lib/async/http/protocol/http2/response.rb +8 -8
- data/lib/async/http/protocol/http2/server.rb +5 -6
- data/lib/async/http/protocol/http2/stream.rb +8 -4
- 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: d5e09e728db3e597f9a7b4b9624d13f62c65e9f13937a3f71c12fc8d833c2cdf
|
4
|
+
data.tar.gz: 10d32ca9036f5528f13aad1fdedf323406da70f9aff5e58ec6e23207fe53a801
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d48fe23d432ccfec8b61635cdf7e6633a26920b9169b56c40ee5230e059824f2e36c5ad9f0163efd0931f1bc91ad59318b54183488040b9bc72875d6d7be9071
|
7
|
+
data.tar.gz: c9faba5394ce276c6f20aac2c4396c1aea37705f2153169edfd1bdeabb2b1afd6fb62fa5c9dff5cb8d439998769dd7e0ac5d84f7df137b168829660643666941
|
data/async-http.gemspec
CHANGED
@@ -21,7 +21,7 @@ Gem::Specification.new do |spec|
|
|
21
21
|
|
22
22
|
spec.add_dependency("protocol-http", "~> 0.8.0")
|
23
23
|
spec.add_dependency("protocol-http1", "~> 0.8.0")
|
24
|
-
spec.add_dependency("protocol-http2", "~> 0.
|
24
|
+
spec.add_dependency("protocol-http2", "~> 0.5.0")
|
25
25
|
|
26
26
|
# spec.add_dependency("openssl")
|
27
27
|
|
@@ -38,6 +38,10 @@ module Async
|
|
38
38
|
super(framer)
|
39
39
|
end
|
40
40
|
|
41
|
+
def create_response
|
42
|
+
Response.new(self, self.next_stream_id)
|
43
|
+
end
|
44
|
+
|
41
45
|
def stop_connection(error)
|
42
46
|
super
|
43
47
|
|
@@ -54,10 +58,7 @@ module Async
|
|
54
58
|
|
55
59
|
@count += 1
|
56
60
|
|
57
|
-
|
58
|
-
response = Response.new(self, stream_id)
|
59
|
-
@streams[stream_id] = response.stream
|
60
|
-
|
61
|
+
response = create_response
|
61
62
|
response.send_request(request)
|
62
63
|
response.wait
|
63
64
|
|
@@ -46,16 +46,16 @@ module Async
|
|
46
46
|
@connection.enable_push?
|
47
47
|
end
|
48
48
|
|
49
|
-
def
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
return request.stream
|
49
|
+
def create_push_promise_stream(headers)
|
50
|
+
@connection.create_push_promise_stream do |stream_id|
|
51
|
+
request = self.class.new(@connection, stream_id)
|
52
|
+
|
53
|
+
request.receive_headers(self, headers, false)
|
54
|
+
end
|
56
55
|
end
|
57
56
|
|
58
|
-
|
57
|
+
# Stream state transition into `:closed`.
|
58
|
+
def close!
|
59
59
|
end
|
60
60
|
|
61
61
|
# @return [Stream] the promised stream, on which to send data.
|
@@ -46,16 +46,16 @@ module Async
|
|
46
46
|
@promises ||= Async::Queue.new
|
47
47
|
end
|
48
48
|
|
49
|
-
def
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
return promise.stream
|
49
|
+
def accept_push_promise_stream(promised_stream_id, headers)
|
50
|
+
@connection.accept_push_promise_stream(promised_stream_id) do
|
51
|
+
promise = Promise.new(@connection, headers, promised_stream_id)
|
52
|
+
|
53
|
+
self.promises.enqueue(promise)
|
54
|
+
end
|
56
55
|
end
|
57
56
|
|
58
|
-
|
57
|
+
# Stream state transition into `:closed`.
|
58
|
+
def close!
|
59
59
|
self.promises.enqueue(nil)
|
60
60
|
end
|
61
61
|
|
@@ -43,12 +43,11 @@ module Async
|
|
43
43
|
|
44
44
|
attr :requests
|
45
45
|
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
return request.stream
|
46
|
+
# A new request has come in:
|
47
|
+
def accept_stream(stream_id)
|
48
|
+
super do
|
49
|
+
Request.new(self, stream_id)
|
50
|
+
end
|
52
51
|
end
|
53
52
|
|
54
53
|
def stop_connection(error)
|
@@ -39,14 +39,18 @@ module Async
|
|
39
39
|
attr_accessor :delegate
|
40
40
|
attr :body
|
41
41
|
|
42
|
-
def
|
43
|
-
@delegate.
|
42
|
+
def create_push_promise_stream(headers)
|
43
|
+
@delegate.create_push_promise_stream(headers)
|
44
44
|
end
|
45
45
|
|
46
|
-
def
|
46
|
+
def accept_push_promise_stream(headers, stream_id)
|
47
|
+
@delegate.accept_push_promise_stream(headers, stream_id)
|
48
|
+
end
|
49
|
+
|
50
|
+
def close!
|
47
51
|
super
|
48
52
|
|
49
|
-
@delegate.close
|
53
|
+
@delegate.close!
|
50
54
|
end
|
51
55
|
|
52
56
|
def send_body(body, task: Async::Task.current)
|
data/lib/async/http/version.rb
CHANGED
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.45.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -72,14 +72,14 @@ dependencies:
|
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0.
|
75
|
+
version: 0.5.0
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0.
|
82
|
+
version: 0.5.0
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
84
|
name: async-rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|