protocol-http2 0.7.0 → 0.7.1

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: 49e091bc1a6d2b2bdee4176a13648d306f81042ebc6d25cf0a44a921d33d0950
4
- data.tar.gz: 5ecd3a8454c2a130247c624abdd067d87b38e63c09e9ed88fe2214e52461ac6c
3
+ metadata.gz: 0bc103676e91753b4b44acb12c5eefdbb953ce40eababe8cd4a21ace86933b41
4
+ data.tar.gz: f2ced13b3ea70afd4db4727a1def5329b519cbd2a3c1e0f499a17cac90df37ae
5
5
  SHA512:
6
- metadata.gz: ca124b2c3232e5329b4dd19c29f1b503fb490a03d94b1501f03de0ca1f478fbed8a99c38318002eda6b7f2df484be0b8ab9b1ed0c38a4388a7e63ed2065a5d2f
7
- data.tar.gz: e766f4a80429e0ddc22edc2700ce4d20054d4fc07de7d81677cb1b89351019c5bf565a5ff51ce224002d0bb3e9184cbdda97807c2d59013d34c67fab31421443
6
+ metadata.gz: d4669297dbc62043223d50bc8ac67a9a04b1c6bb945ea23eece1ee9eff6b415b1ab91d77e1d6430e8547bb080ba2eef33515a670775db567c63a0b3b61369989
7
+ data.tar.gz: 8302a54d91bf4930d271a858f09afa93566e9eaba16edc28053a24c37bad6629d759c8140f20239dddcda04228e5c996feb3a623c9fa5478c4a05c90183c017a
@@ -182,7 +182,7 @@ module Protocol
182
182
  send_goaway(error.code || PROTOCOL_ERROR, error.message)
183
183
 
184
184
  raise
185
- rescue HPACK::CompressionError => error
185
+ rescue HPACK::Error => error
186
186
  send_goaway(COMPRESSION_ERROR, error.message)
187
187
 
188
188
  raise
@@ -45,7 +45,7 @@ module Protocol
45
45
  def unpack
46
46
  data = super
47
47
 
48
- stream_id = data.unpack(FORMAT).first
48
+ stream_id = data.unpack1(FORMAT)
49
49
 
50
50
  return stream_id, data.byteslice(4, data.bytesize - 4)
51
51
  end
@@ -48,7 +48,7 @@ module Protocol
48
48
  FORMAT = "N".freeze
49
49
 
50
50
  def unpack
51
- @payload.unpack(FORMAT).first
51
+ @payload.unpack1(FORMAT)
52
52
  end
53
53
 
54
54
  def pack(error_code = NO_ERROR)
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Protocol
22
22
  module HTTP2
23
- VERSION = "0.7.0"
23
+ VERSION = "0.7.1"
24
24
  end
25
25
  end
@@ -97,7 +97,15 @@ module Protocol
97
97
  end
98
98
 
99
99
  def unpack
100
- super.unpack(FORMAT).first
100
+ super.unpack1(FORMAT)
101
+ end
102
+
103
+ def read_payload(stream)
104
+ super
105
+
106
+ if @length != 4
107
+ raise FrameSizeError, "Invalid frame length: #{@length} != 4!"
108
+ end
101
109
  end
102
110
 
103
111
  def apply(connection)
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "protocol-hpack", "~> 1.2"
21
+ spec.add_dependency "protocol-hpack", "~> 1.3"
22
22
  spec.add_dependency "protocol-http", "~> 0.2"
23
23
 
24
24
  spec.add_development_dependency "covered"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '1.2'
19
+ version: '1.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '1.2'
26
+ version: '1.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: protocol-http
29
29
  requirement: !ruby/object:Gem::Requirement