async-http 0.12.0 → 0.13.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/async/http/body.rb +4 -0
- data/lib/async/http/protocol/http11.rb +11 -3
- data/lib/async/http/protocol/http2.rb +1 -0
- data/lib/async/http/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab2ed7709920b3e9cc8238a985394b70d551ccb48c6b96a56c2c792e8198c43b
|
4
|
+
data.tar.gz: bcf589caf131f60b2f5f03055405cca63dfc78454ec1cd53b4dd651f0fc53f31
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4758cfb15c4cf6d5a338a108952cb0d0a055c3f02158560b0c31153269ce08ae625de08432a2870a0e45efbd18a563c43ff21d79ea2355246e93154bd27dd548
|
7
|
+
data.tar.gz: de8a8ab4b60f5a27fe00c670e2f5e1a3a1588c0baef96288e85482ffe4ce2158a1fbf95f186ceb0cf89de5599b15eefa8dd6414519fd965830fbc1c5c82e2710
|
data/lib/async/http/body.rb
CHANGED
@@ -72,6 +72,8 @@ module Async
|
|
72
72
|
|
73
73
|
write_response(request.version, status, headers, body)
|
74
74
|
|
75
|
+
request.close
|
76
|
+
|
75
77
|
unless keep_alive?(request.headers) and keep_alive?(headers)
|
76
78
|
@keep_alive = false
|
77
79
|
|
@@ -195,15 +197,17 @@ module Async
|
|
195
197
|
size = @protocol.read_line.to_i(16)
|
196
198
|
|
197
199
|
if size == 0
|
198
|
-
@closed = true
|
199
200
|
@protocol.read_line
|
200
201
|
|
202
|
+
@closed = true
|
203
|
+
|
201
204
|
return
|
202
205
|
end
|
203
206
|
|
204
|
-
|
205
|
-
|
207
|
+
chunk = @protocol.stream.read(size)
|
206
208
|
@protocol.read_line # Consume the trailing CRLF
|
209
|
+
|
210
|
+
yield chunk
|
207
211
|
end
|
208
212
|
end
|
209
213
|
|
@@ -216,6 +220,10 @@ module Async
|
|
216
220
|
|
217
221
|
return buffer
|
218
222
|
end
|
223
|
+
|
224
|
+
def close
|
225
|
+
self.each {}
|
226
|
+
end
|
219
227
|
end
|
220
228
|
|
221
229
|
def read_body(headers)
|
data/lib/async/http/version.rb
CHANGED