async-http 0.50.5 → 0.50.6

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: fe10cc184257f0419dda2ec007872f881b6e9755b3bc9c16ffc98e530bf303a6
4
- data.tar.gz: 680a47bf8bfe1bfbdc394834bbaf9dc441f394c19aebedc50c68aa86517f6bc7
3
+ metadata.gz: 783c5bea153973dd5a5c01032f4f7b2ec8c838b48508d744bb89c7e77701af6b
4
+ data.tar.gz: 688ac155fd0851a35f90cad19235df4c23054d15be47868664aa8c2a26c418ea
5
5
  SHA512:
6
- metadata.gz: 6d3855acb1b0dbcb71b4ffb1fef53197657706cd9bc83a7cb30d347181976c2ff7b6b70b97b58a0ee505a69c16944766c2dc2c4596525c1b53de1bf01281dabe
7
- data.tar.gz: 62b71cb26b87fa38958ef7e1e524ad5ea9bf385bee4f4698b9b97f09d64b80a4f5787a9a9f03f4ce56179e74b75b548ee51154c8c93856a7ee2ab3990a88896b
6
+ metadata.gz: 6ff34b8f8ecf007c017e20ea09f5a48564027db9c3f11880d315037ea3d861a82c18651c10c73d9c635595dd575ca21564c1d4679da1cf1dc0c6c78d6875a55f
7
+ data.tar.gz: 57ddc6912f594e35243a008782d35d705bd66fbe8f6505b45f28c63268e707f6f9a53f4c009f75bbe75282f690db87a006a8eacc3c49e85086002a6e6e312a9c
@@ -166,7 +166,7 @@ module Async
166
166
  def send_response(response)
167
167
  if response.nil?
168
168
  @stream.send_headers(nil, NO_RESPONSE, ::Protocol::HTTP2::END_STREAM)
169
- elsif response.body?
169
+ elsif response.body? && !self.head?
170
170
  pseudo_headers = [
171
171
  [STATUS, response.status],
172
172
  ]
@@ -192,6 +192,9 @@ module Async
192
192
  ], response.headers)
193
193
 
194
194
  @stream.send_headers(nil, headers, ::Protocol::HTTP2::END_STREAM)
195
+
196
+ # If the response had a body but it was not sent, close it (e.g. HEAD request).
197
+ response.body&.close
195
198
  end
196
199
  end
197
200
  end
@@ -22,6 +22,6 @@
22
22
 
23
23
  module Async
24
24
  module HTTP
25
- VERSION = "0.50.5"
25
+ VERSION = "0.50.6"
26
26
  end
27
27
  end
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.50.5
4
+ version: 0.50.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-18 00:00:00.000000000 Z
11
+ date: 2020-03-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async