async-http 0.40.1 → 0.40.2

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: 19652f31b1217cc8b9e93e6d633e0f4bf5fd8fbd0b2f65ad68ebefee8e5bae8e
4
- data.tar.gz: 0a0c185d0127532f1c078dd39719e705f102b5750cc5b62d206f3b535c6f30c0
3
+ metadata.gz: d52ccd5014c47f8a71d2bc51494661234d5a51c6e48129dc30fcb00bed20fbfb
4
+ data.tar.gz: 7c25b371c99a7a02b5481c0552aa392e4218de84cfa6911fab4d0afb9f7e008a
5
5
  SHA512:
6
- metadata.gz: 3395f5ac2df1c7b7ca1d966329726bfbed96dbcba0a5f1d17291975c83e1ac76aefd0ed8d5649dc0924688bdc933a24e23250f0fe558ae54e771a4a2c7f4767e
7
- data.tar.gz: b2edc23828a9bce9714fb86c2b12eb3dd0795dca1e573b200b52398506c1b591e44cf7364abc017765d4e939aabcc96e3d969a78d26cd796c95126a2be07a84c
6
+ metadata.gz: 4d36812a4ee226de8d41c91b65a61faafbe174a121b6bc5b3524196844c8f360e3b880d7e802be8c54388346e069f69b035b109495f9820126a2d1d1136c28a3
7
+ data.tar.gz: 3c2993a11b3dc7bf01c2daf9f9810afe0698808e62044600af451c531281bb885d6c8e60c758334a1a2cd36481a2cacb2fa8ccac0305dc8d3abb96f593741cb7
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
  spec.add_dependency("async-io", "~> 1.18")
21
21
 
22
22
  spec.add_dependency("protocol-http", "~> 0.3.0")
23
- spec.add_dependency("protocol-http1", "~> 0.3.0")
23
+ spec.add_dependency("protocol-http1", "~> 0.4.0")
24
24
  spec.add_dependency("protocol-http2", "~> 0.2.0")
25
25
 
26
26
  # spec.add_dependency("openssl")
@@ -67,35 +67,6 @@ module Async
67
67
  "\#<#{self.class} length=#{@length} remaining=#{@remaining}>"
68
68
  end
69
69
  end
70
-
71
- class Remainder < Readable
72
- def initialize(stream)
73
- @stream = stream
74
- end
75
-
76
- def empty?
77
- @stream.closed?
78
- end
79
-
80
- def close(error = nil)
81
- # We can't really do anything in this case except close the connection.
82
- @stream.close
83
-
84
- super
85
- end
86
-
87
- def read
88
- @stream.read_partial
89
- end
90
-
91
- def join
92
- read
93
- end
94
-
95
- def inspect
96
- "\#<#{self.class} #{@stream.closed? ? 'closed' : 'open'}>"
97
- end
98
- end
99
70
  end
100
71
  end
101
72
  end
@@ -0,0 +1,56 @@
1
+ # Copyright, 2018, by Samuel G. D. Williams. <http://www.codeotaku.com>
2
+ #
3
+ # Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ # of this software and associated documentation files (the "Software"), to deal
5
+ # in the Software without restriction, including without limitation the rights
6
+ # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ # copies of the Software, and to permit persons to whom the Software is
8
+ # furnished to do so, subject to the following conditions:
9
+ #
10
+ # The above copyright notice and this permission notice shall be included in
11
+ # all copies or substantial portions of the Software.
12
+ #
13
+ # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ # THE SOFTWARE.
20
+
21
+ require_relative 'readable'
22
+
23
+ module Async
24
+ module HTTP
25
+ module Body
26
+ class Remainder < Readable
27
+ def initialize(stream)
28
+ @stream = stream
29
+ end
30
+
31
+ def empty?
32
+ @stream.closed?
33
+ end
34
+
35
+ def close(error = nil)
36
+ # We can't really do anything in this case except close the connection.
37
+ @stream.close
38
+
39
+ super
40
+ end
41
+
42
+ def read
43
+ @stream.read_partial
44
+ end
45
+
46
+ def join
47
+ read
48
+ end
49
+
50
+ def inspect
51
+ "\#<#{self.class} #{@stream.closed? ? 'closed' : 'open'}>"
52
+ end
53
+ end
54
+ end
55
+ end
56
+ end
@@ -25,6 +25,7 @@ require_relative 'response'
25
25
 
26
26
  require_relative '../../body/chunked'
27
27
  require_relative '../../body/fixed'
28
+ require_relative '../../body/remainder'
28
29
 
29
30
  module Async
30
31
  module HTTP
@@ -86,10 +87,6 @@ module Async
86
87
  Body::Fixed.new(@stream, length)
87
88
  end
88
89
 
89
- def read_tunnel_body
90
- read_remainder_body
91
- end
92
-
93
90
  def read_remainder_body
94
91
  Body::Remainder.new(@stream)
95
92
  end
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Async
22
22
  module HTTP
23
- VERSION = "0.40.1"
23
+ VERSION = "0.40.2"
24
24
  end
25
25
  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.40.1
4
+ version: 0.40.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-10 00:00:00.000000000 Z
11
+ date: 2019-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.3.0
61
+ version: 0.4.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.3.0
68
+ version: 0.4.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: protocol-http2
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -191,6 +191,7 @@ files:
191
191
  - lib/async/http/body/inflate.rb
192
192
  - lib/async/http/body/readable.rb
193
193
  - lib/async/http/body/reader.rb
194
+ - lib/async/http/body/remainder.rb
194
195
  - lib/async/http/body/rewindable.rb
195
196
  - lib/async/http/body/slowloris.rb
196
197
  - lib/async/http/body/stream.rb
@@ -251,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
251
252
  - !ruby/object:Gem::Version
252
253
  version: '0'
253
254
  requirements: []
254
- rubygems_version: 3.0.3
255
+ rubygems_version: 3.0.2
255
256
  signing_key:
256
257
  specification_version: 4
257
258
  summary: A HTTP client and server library.