protocol-http2 0.15.0 → 0.16.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 28d53d86975d6aa52e2ea20e36c41fa4e8fff6437ef8b831de001b3d2849609b
4
- data.tar.gz: 6c13193934a0eea767493757ff70e814d68f66fe68af4a774fb22d707e78437d
3
+ metadata.gz: 9b04aa8b3ac2dcabc6345c950831b612f2343244a17655cb955f668d91f427dd
4
+ data.tar.gz: 3796185ba4e59277d08683ee2e80ffab91c9efa8fb24b4cfbc7c69ba8beb7995
5
5
  SHA512:
6
- metadata.gz: 13bcd265d3eba3c322cdc6a473955a946a219f9d6f0015607a04248392fccadf70d456b42e1fdc455697678f95a87982e95ca7dda1774468f87dfdb16ed09d4e
7
- data.tar.gz: 1f393c99f5657db925c6ea337ba5190cc722b8e8698d7d30751348b061719c60f905b551a2d60e1d90182a94dae1c2dcbc23eee9c2bf408b46bb0b08faa3799f
6
+ metadata.gz: 44c60b4ceeb39e553ed362c117bc518a7a19106436fe006b191b94128deff6c7ca2f7433c0e78c1c4b86925dd5ab662cb7b221e8dd46806dabb4c8f3aae76d1f
7
+ data.tar.gz: d66e9905d31273733764cbf7ee6514a089e010e3afc45816aec0e1e993dbc0cb495c5144c89afec03f83f54d30a746a437eb78cdb57336f9c97455a0e75c9ee3
checksums.yaml.gz.sig CHANGED
Binary file
@@ -101,6 +101,7 @@ module Protocol
101
101
  @streams.each_value{|stream| stream.close(error)}
102
102
  @streams.clear
103
103
 
104
+ ensure
104
105
  if @framer
105
106
  @framer.close
106
107
  @framer = nil
@@ -29,11 +29,11 @@ module Protocol
29
29
 
30
30
  buffer = String.new.b
31
31
 
32
- buffer << padding_size.chr
32
+ buffer << padding_size
33
33
  buffer << data
34
34
 
35
- if padding_size > 1
36
- buffer << "\0" * (padding_size - 1)
35
+ if padding_size
36
+ buffer << ("\0" * padding_size)
37
37
  end
38
38
 
39
39
  super buffer
@@ -47,7 +47,9 @@ module Protocol
47
47
  def unpack
48
48
  if padded?
49
49
  padding_size = @payload[0].ord
50
- data_size = @payload.bytesize - padding_size
50
+
51
+ # 1 byte for the padding octet, and padding_size bytes for the padding itself:
52
+ data_size = @payload.bytesize - (1 + padding_size)
51
53
 
52
54
  if data_size < 0
53
55
  raise ProtocolError, "Invalid padding length: #{padding_size}"
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module HTTP2
8
- VERSION = "0.15.0"
8
+ VERSION = "0.16.0"
9
9
  end
10
10
  end
data/license.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # MIT License
2
2
 
3
- Copyright, 2019-2023, by Samuel Williams.
3
+ Copyright, 2019-2024, by Samuel Williams.
4
4
  Copyright, 2019, by Yuta Iwama.
5
5
  Copyright, 2020, by Olle Jonsson.
6
6
  Copyright, 2023, by Marco Concetto Rudilosso.
data/readme.md CHANGED
@@ -96,3 +96,11 @@ We welcome contributions to this project.
96
96
  3. Commit your changes (`git commit -am 'Add some feature'`).
97
97
  4. Push to the branch (`git push origin my-new-feature`).
98
98
  5. Create new Pull Request.
99
+
100
+ ### Developer Certificate of Origin
101
+
102
+ This project uses the [Developer Certificate of Origin](https://developercertificate.org/). All contributors to this project must agree to this document to have their contributions accepted.
103
+
104
+ ### Contributor Covenant
105
+
106
+ This project is governed by the [Contributor Covenant](https://www.contributor-covenant.org/). All contributors and participants agree to abide by its terms.
data.tar.gz.sig CHANGED
Binary file
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.15.0
4
+ version: 0.16.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
@@ -40,7 +40,7 @@ cert_chain:
40
40
  Q2K9NVun/S785AP05vKkXZEFYxqG6EW012U4oLcFl5MySFajYXRYbuUpH6AY+HP8
41
41
  voD0MPg1DssDLKwXyt1eKD/+Fq0bFWhwVM/1XiAXL7lyYUyOq24KHgQ2Csg=
42
42
  -----END CERTIFICATE-----
43
- date: 2023-02-02 00:00:00.000000000 Z
43
+ date: 2024-01-26 00:00:00.000000000 Z
44
44
  dependencies:
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: protocol-hpack
@@ -70,48 +70,6 @@ dependencies:
70
70
  - - "~>"
71
71
  - !ruby/object:Gem::Version
72
72
  version: '0.18'
73
- - !ruby/object:Gem::Dependency
74
- name: bundler
75
- requirement: !ruby/object:Gem::Requirement
76
- requirements:
77
- - - ">="
78
- - !ruby/object:Gem::Version
79
- version: '0'
80
- type: :development
81
- prerelease: false
82
- version_requirements: !ruby/object:Gem::Requirement
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- version: '0'
87
- - !ruby/object:Gem::Dependency
88
- name: covered
89
- requirement: !ruby/object:Gem::Requirement
90
- requirements:
91
- - - ">="
92
- - !ruby/object:Gem::Version
93
- version: '0'
94
- type: :development
95
- prerelease: false
96
- version_requirements: !ruby/object:Gem::Requirement
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- version: '0'
101
- - !ruby/object:Gem::Dependency
102
- name: sus
103
- requirement: !ruby/object:Gem::Requirement
104
- requirements:
105
- - - ">="
106
- - !ruby/object:Gem::Version
107
- version: '0'
108
- type: :development
109
- prerelease: false
110
- version_requirements: !ruby/object:Gem::Requirement
111
- requirements:
112
- - - ">="
113
- - !ruby/object:Gem::Version
114
- version: '0'
115
73
  description:
116
74
  email:
117
75
  executables: []
@@ -154,14 +112,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
154
112
  requirements:
155
113
  - - ">="
156
114
  - !ruby/object:Gem::Version
157
- version: '2.7'
115
+ version: '3.0'
158
116
  required_rubygems_version: !ruby/object:Gem::Requirement
159
117
  requirements:
160
118
  - - ">="
161
119
  - !ruby/object:Gem::Version
162
120
  version: '0'
163
121
  requirements: []
164
- rubygems_version: 3.4.1
122
+ rubygems_version: 3.5.3
165
123
  signing_key:
166
124
  specification_version: 4
167
125
  summary: A low level implementation of the HTTP/2 protocol.
metadata.gz.sig CHANGED
Binary file