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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 87e0a46072706fa11d787dbaa220ebbb59d3ac15dc0b374b2067884668ca0de1
4
- data.tar.gz: f98272e3c8d0c03f53f502139772683b683133bae07f9e0ece6eba0fa8264cfb
3
+ metadata.gz: 357920d7385810d51149004ef9dffe390046cfd0f73766567188ad107bdbd738
4
+ data.tar.gz: 58523b0bd24245c299937e5ba2e3c0de6afe0811e11c83db2fea3d2019521af1
5
5
  SHA512:
6
- metadata.gz: e25c217ffb5939937df9d99dd75389d16d04ed6c9814a1f83c24fa02d8a730aa19ae2d96f95f6e2e78c1825c571358829076ac6838eff101388d6da3aa56b35b
7
- data.tar.gz: 8b0fba109c712997fd7582cdff517438592f0ad800f5145ec361450626b92dd17b0c8386fe761d3c67024627d5f883e4a86d78c8acdee39885a966f3b8dd76d1
6
+ metadata.gz: 9c5202d7cc4c61aed8e2eae0b15a509562fe51117409f10a2505c64a461c0aa5763463a5de2016c9d414d1c87e26eb2d0d04fd132a7d97b94c059a2d44feeb63
7
+ data.tar.gz: 39666f6fc703124c4f84dbd6efdb42807d8e86a6a56bd460bb474dece8c1f7fa47e7608bc521f163a113b963f9d42bcb432835a95620b209f58f1a29a85cb4f8
@@ -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.11")
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
- # 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.
41
- self.write_body(request.body)
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)
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module HTTP
23
- VERSION = "0.37.11"
23
+ VERSION = "0.37.12"
24
24
  end
25
25
  end
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.11
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.11'
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.11'
54
+ version: '0.12'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: async-rspec
57
57
  requirement: !ruby/object:Gem::Requirement