async-http 0.37.11 → 0.37.12
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/http1/client.rb +9 -3
- 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: 357920d7385810d51149004ef9dffe390046cfd0f73766567188ad107bdbd738
|
4
|
+
data.tar.gz: 58523b0bd24245c299937e5ba2e3c0de6afe0811e11c83db2fea3d2019521af1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c5202d7cc4c61aed8e2eae0b15a509562fe51117409f10a2505c64a461c0aa5763463a5de2016c9d414d1c87e26eb2d0d04fd132a7d97b94c059a2d44feeb63
|
7
|
+
data.tar.gz: 39666f6fc703124c4f84dbd6efdb42807d8e86a6a56bd460bb474dece8c1f7fa47e7608bc521f163a113b963f9d42bcb432835a95620b209f58f1a29a85cb4f8
|
data/async-http.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.add_dependency("async", "~> 1.14")
|
20
20
|
spec.add_dependency("async-io", "~> 1.18")
|
21
21
|
|
22
|
-
spec.add_dependency("http-protocol", "~> 0.
|
22
|
+
spec.add_dependency("http-protocol", "~> 0.12")
|
23
23
|
|
24
24
|
# spec.add_dependency("openssl")
|
25
25
|
|
@@ -26,7 +26,7 @@ module Async
|
|
26
26
|
module HTTP1
|
27
27
|
class Client < Connection
|
28
28
|
# Used by the client to send requests to the remote server.
|
29
|
-
def call(request)
|
29
|
+
def call(request, task: Task.current)
|
30
30
|
Async.logger.debug(self) {"#{request.method} #{request.path} #{request.headers.inspect}"}
|
31
31
|
|
32
32
|
# We carefully interpret https://tools.ietf.org/html/rfc7230#section-6.3.1 to implement this correctly.
|
@@ -37,8 +37,14 @@ module Async
|
|
37
37
|
raise RequestFailed.new
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
|
40
|
+
if request.body?
|
41
|
+
task.async do
|
42
|
+
# Once we start writing the body, we can't recover if the request fails. That's because the body might be generated dynamically, streaming, etc.
|
43
|
+
self.write_body(request.body)
|
44
|
+
end
|
45
|
+
else
|
46
|
+
self.write_empty_body(request.body)
|
47
|
+
end
|
42
48
|
|
43
49
|
# This won't return the response until the entire body is written.
|
44
50
|
return Response.new(self, request)
|
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.37.
|
4
|
+
version: 0.37.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0.
|
47
|
+
version: '0.12'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0.
|
54
|
+
version: '0.12'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: async-rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|