async-http 0.37.0 → 0.37.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/async-http.gemspec +1 -1
- data/lib/async/http/accept_encoding.rb +1 -3
- data/lib/async/http/body/readable.rb +9 -9
- data/lib/async/http/protocol/http1/connection.rb +12 -0
- data/lib/async/http/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ec3dbcddab76f2c928387317d213c91f1a7902563cb0393dc257c674b3e8331
|
4
|
+
data.tar.gz: 3657bbf504ef8f4f5b1e2f883df414d3c5f4023e9624a56e0167596f29250353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a5bb09de3ac1859812ca9ecf9b44e3cdd5e8f4a6a7bf7e3892dda8cdc7b4b71f48dce75d3fd02224b27df3dcbab43fff2a55af9d5e3bd56d7f0c3da2c8528ab
|
7
|
+
data.tar.gz: b46858302fb8401e99362b945d0b9d35a36b4918fc2b3e8bc60c4dd4af73471e4535007dfd89d744bd9952c17deb175e1a8b98ef61bc5674785d2c21ab671079
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Async::HTTP
|
2
2
|
|
3
|
-
An asynchronous client and server implementation of HTTP/1.0, HTTP/1.1 and HTTP/2
|
3
|
+
An asynchronous client and server implementation of HTTP/1.0, HTTP/1.1 and HTTP/2 including TLS. Support for streaming requests and responses. Built on top of [async] and [async-io]. [falcon] provides a rack-compatible server.
|
4
4
|
|
5
5
|
[](http://travis-ci.org/socketry/async-http)
|
6
6
|
[](https://codeclimate.com/github/socketry/async-http)
|
data/async-http.gemspec
CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.add_dependency("async", "~> 1.6")
|
20
20
|
spec.add_dependency("async-io", "~> 1.16")
|
21
21
|
|
22
|
-
spec.add_dependency("http-protocol", "~> 0.
|
22
|
+
spec.add_dependency("http-protocol", "~> 0.10")
|
23
23
|
|
24
24
|
# spec.add_dependency("openssl")
|
25
25
|
|
@@ -47,9 +47,7 @@ module Async
|
|
47
47
|
|
48
48
|
response = super
|
49
49
|
|
50
|
-
if
|
51
|
-
body = response.body
|
52
|
-
|
50
|
+
if body = response.body and !body.empty? and content_encoding = response.headers.delete(CONTENT_ENCODING)
|
53
51
|
# We want to unwrap all encodings
|
54
52
|
content_encoding.reverse_each do |name|
|
55
53
|
if wrapper = @wrappers[name]
|
@@ -25,15 +25,6 @@ module Async
|
|
25
25
|
module Body
|
26
26
|
# A generic base class for wrapping body instances. Typically you'd override `#read`.
|
27
27
|
class Readable
|
28
|
-
# Read all remaining chunks into a buffered body and close the underlying input.
|
29
|
-
def finish
|
30
|
-
buffered = Buffered.for(self)
|
31
|
-
|
32
|
-
self.close
|
33
|
-
|
34
|
-
return buffered
|
35
|
-
end
|
36
|
-
|
37
28
|
# The consumer can call stop to signal that the stream output has terminated.
|
38
29
|
def close(error = nil)
|
39
30
|
end
|
@@ -52,6 +43,15 @@ module Async
|
|
52
43
|
nil
|
53
44
|
end
|
54
45
|
|
46
|
+
# Read all remaining chunks into a buffered body and close the underlying input.
|
47
|
+
def finish
|
48
|
+
buffered = Buffered.for(self)
|
49
|
+
|
50
|
+
self.close
|
51
|
+
|
52
|
+
return buffered
|
53
|
+
end
|
54
|
+
|
55
55
|
# Enumerate all chunks until finished, then invoke `#close`.
|
56
56
|
def each
|
57
57
|
return to_enum unless block_given?
|
@@ -82,6 +82,18 @@ module Async
|
|
82
82
|
@stream.close
|
83
83
|
end
|
84
84
|
|
85
|
+
def write_empty_body(body)
|
86
|
+
super(body)
|
87
|
+
|
88
|
+
body.close if body
|
89
|
+
end
|
90
|
+
|
91
|
+
def write_body_head(body)
|
92
|
+
super(body)
|
93
|
+
|
94
|
+
body.close if body
|
95
|
+
end
|
96
|
+
|
85
97
|
def read_chunked_body
|
86
98
|
Body::Chunked.new(self)
|
87
99
|
end
|
data/lib/async/http/version.rb
CHANGED
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.37.
|
4
|
+
version: 0.37.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Samuel Williams
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-10
|
11
|
+
date: 2018-11-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: async
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
47
|
+
version: '0.10'
|
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.10'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: async-rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|