async-http 0.79.0 → 0.80.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/http/endpoint.rb +5 -0
- data/lib/async/http/protocol/http1/connection.rb +2 -1
- data/lib/async/http/protocol/http2/output.rb +16 -6
- data/lib/async/http/version.rb +1 -1
- data.tar.gz.sig +0 -0
- metadata +2 -2
- 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: 6563a3eb6c06ca33e6038985b9f4e4608355f8179d010b009f37ae33bb5db906
|
4
|
+
data.tar.gz: ca7d4e2483b0a9c9e277fbbca2741de22e351240b5498317f8373b05c7d6ab3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9f2673c93c361ba9afa178c9a7742aeb2848e44ccec6a483a06694655c9a37364ccd76218f76e111522b8d951ccbe89dee8a32f14a685f134cedaf108e33921
|
7
|
+
data.tar.gz: d273737eb122e13aa9464420bde93a57488e608d41f2c4006f44e9083b6057a20a3904af0db07fa2ab9b564afdceeb40d30823bc6dd9b70460d6a88644a053b3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data/lib/async/http/endpoint.rb
CHANGED
@@ -14,6 +14,11 @@ require "io/endpoint/ssl_endpoint"
|
|
14
14
|
require_relative "protocol/http"
|
15
15
|
require_relative "protocol/https"
|
16
16
|
|
17
|
+
require "uri"
|
18
|
+
|
19
|
+
# Compatibility with Ruby 3.1.2
|
20
|
+
require "uri/wss"
|
21
|
+
|
17
22
|
module Async
|
18
23
|
module HTTP
|
19
24
|
# Represents a way to connect to a remote HTTP server.
|
@@ -17,7 +17,8 @@ module Async
|
|
17
17
|
|
18
18
|
@task = nil
|
19
19
|
|
20
|
-
@
|
20
|
+
@guard = ::Mutex.new
|
21
|
+
@window_updated = ::ConditionVariable.new
|
21
22
|
end
|
22
23
|
|
23
24
|
attr :trailer
|
@@ -33,17 +34,26 @@ module Async
|
|
33
34
|
end
|
34
35
|
|
35
36
|
def window_updated(size)
|
36
|
-
@
|
37
|
+
@guard.synchronize do
|
38
|
+
@window_updated.signal
|
39
|
+
end
|
37
40
|
end
|
38
41
|
|
39
42
|
def write(chunk)
|
40
43
|
until chunk.empty?
|
41
44
|
maximum_size = @stream.available_frame_size
|
42
45
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
46
|
+
# We try to avoid synchronization if possible:
|
47
|
+
if maximum_size <= 0
|
48
|
+
@guard.synchronize do
|
49
|
+
maximum_size = @stream.available_frame_size
|
50
|
+
|
51
|
+
while maximum_size <= 0
|
52
|
+
@window_updated.wait(@guard)
|
53
|
+
|
54
|
+
maximum_size = @stream.available_frame_size
|
55
|
+
end
|
56
|
+
end
|
47
57
|
end
|
48
58
|
|
49
59
|
break unless chunk = send_data(chunk, maximum_size)
|
data/lib/async/http/version.rb
CHANGED
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.80.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -58,7 +58,7 @@ cert_chain:
|
|
58
58
|
Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
|
59
59
|
voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
|
60
60
|
-----END CERTIFICATE-----
|
61
|
-
date: 2024-
|
61
|
+
date: 2024-10-12 00:00:00.000000000 Z
|
62
62
|
dependencies:
|
63
63
|
- !ruby/object:Gem::Dependency
|
64
64
|
name: async
|
metadata.gz.sig
CHANGED
Binary file
|