protocol-http2 0.18.0 → 0.19.0

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: d3d7de9d5cea0bc568ee4cfe9c36ec1857d3e268b5b183bda0602fb66862faf3
4
- data.tar.gz: 2a5e7b2fae05cb3ff96cc821160f745e80ffd45eef1363ea99c4c029853f5073
3
+ metadata.gz: 6fa9a1478ba8829d9e4416cd5507ca611d5e502eb242b1d873d44d1d60a40850
4
+ data.tar.gz: 4c560c928f9027108f5cf6b4fd135ce2a7043815cf8c4e2077fd5d20865e26be
5
5
  SHA512:
6
- metadata.gz: 15841f05ca83452964396dd3e9b2c7d0f7dd456d38495772545e3a57b1991a589a3fb68b99721c3303af76318dde23b8d8839242310da172b5ef715efcc0da61
7
- data.tar.gz: 7148bc4ba24d364960beee692fce5f7be577bc147045ae1a829cb26b64c363501307359b998c16e36bd6bcfcfb6a2405f7f93d4ed8db2c231b5a1be814792fd9
6
+ metadata.gz: 95f413d65bbde12d848f7cbe342274d7e914aca16c1a60d2f3193b91e670ae0553233fe3ae1ef4699d87984c711311c7247daac0990bb44ab0f8d3aa44d4f604
7
+ data.tar.gz: 5abe10dc681f35b42a123e69b4fca512d8f0e43b5741d9ab4987c336efa508e6981f2370357fa384c22bbaed8ab5d7725257dc2816823b29926de2c2e7d68d6a
checksums.yaml.gz.sig CHANGED
Binary file
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'connection'
6
+ require_relative "connection"
7
7
 
8
8
  module Protocol
9
9
  module HTTP2
@@ -4,11 +4,11 @@
4
4
  # Copyright, 2019-2024, by Samuel Williams.
5
5
  # Copyright, 2023, by Marco Concetto Rudilosso.
6
6
 
7
- require_relative 'framer'
8
- require_relative 'dependency'
9
- require_relative 'flow_controlled'
7
+ require_relative "framer"
8
+ require_relative "dependency"
9
+ require_relative "flow_controlled"
10
10
 
11
- require 'protocol/hpack'
11
+ require "protocol/hpack"
12
12
 
13
13
  module Protocol
14
14
  module HTTP2
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'frame'
6
+ require_relative "frame"
7
7
 
8
8
  module Protocol
9
9
  module HTTP2
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'frame'
7
- require_relative 'padded'
6
+ require_relative "frame"
7
+ require_relative "padded"
8
8
 
9
9
  module Protocol
10
10
  module HTTP2
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require 'protocol/http/error'
6
+ require "protocol/http/error"
7
7
 
8
8
  module Protocol
9
9
  module HTTP2
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
  # Copyright, 2019, by Yuta Iwama.
6
6
 
7
- require_relative 'window_update_frame'
7
+ require_relative "window_update_frame"
8
8
 
9
9
  module Protocol
10
10
  module HTTP2
@@ -1,10 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
  # Copyright, 2019, by Yuta Iwama.
6
6
 
7
- require_relative 'error'
7
+ require_relative "error"
8
8
 
9
9
  module Protocol
10
10
  module HTTP2
@@ -106,7 +106,7 @@ module Protocol
106
106
  @stream_id.zero?
107
107
  end
108
108
 
109
- HEADER_FORMAT = 'CnCCN'.freeze
109
+ HEADER_FORMAT = "CnCCN".freeze
110
110
  STREAM_ID_MASK = 0x7fffffff
111
111
 
112
112
  # Generates common 9-byte frame header.
@@ -3,18 +3,18 @@
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'error'
6
+ require_relative "error"
7
7
 
8
- require_relative 'data_frame'
9
- require_relative 'headers_frame'
10
- require_relative 'priority_frame'
11
- require_relative 'reset_stream_frame'
12
- require_relative 'settings_frame'
13
- require_relative 'push_promise_frame'
14
- require_relative 'ping_frame'
15
- require_relative 'goaway_frame'
16
- require_relative 'window_update_frame'
17
- require_relative 'continuation_frame'
8
+ require_relative "data_frame"
9
+ require_relative "headers_frame"
10
+ require_relative "priority_frame"
11
+ require_relative "reset_stream_frame"
12
+ require_relative "settings_frame"
13
+ require_relative "push_promise_frame"
14
+ require_relative "ping_frame"
15
+ require_relative "goaway_frame"
16
+ require_relative "window_update_frame"
17
+ require_relative "continuation_frame"
18
18
 
19
19
  module Protocol
20
20
  module HTTP2
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'frame'
6
+ require_relative "frame"
7
7
 
8
8
  module Protocol
9
9
  module HTTP2
@@ -1,12 +1,12 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'frame'
7
- require_relative 'padded'
8
- require_relative 'continuation_frame'
9
- require_relative 'priority_frame'
6
+ require_relative "frame"
7
+ require_relative "padded"
8
+ require_relative "continuation_frame"
9
+ require_relative "priority_frame"
10
10
 
11
11
  module Protocol
12
12
  module HTTP2
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'frame'
6
+ require_relative "frame"
7
7
 
8
8
  module Protocol
9
9
  module HTTP2
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'frame'
6
+ require_relative "frame"
7
7
 
8
8
  module Protocol
9
9
  module HTTP2
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'frame'
6
+ require_relative "frame"
7
7
 
8
8
  module Protocol
9
9
  module HTTP2
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'frame'
7
- require_relative 'padded'
8
- require_relative 'continuation_frame'
6
+ require_relative "frame"
7
+ require_relative "padded"
8
+ require_relative "continuation_frame"
9
9
 
10
10
  module Protocol
11
11
  module HTTP2
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'frame'
6
+ require_relative "frame"
7
7
 
8
8
  module Protocol
9
9
  module HTTP2
@@ -3,7 +3,7 @@
3
3
  # Released under the MIT License.
4
4
  # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'connection'
6
+ require_relative "connection"
7
7
 
8
8
  module Protocol
9
9
  module HTTP2
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'ping_frame'
6
+ require_relative "ping_frame"
7
7
 
8
8
  module Protocol
9
9
  module HTTP2
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'connection'
7
- require_relative 'dependency'
6
+ require_relative "connection"
7
+ require_relative "dependency"
8
8
 
9
9
  module Protocol
10
10
  module HTTP2
11
- # A single HTTP 2.0 connection can multiplex multiple streams in parallel:
11
+ # A single HTTP/2 connection can multiplex multiple streams in parallel:
12
12
  # multiple requests and responses can be in flight simultaneously and stream
13
13
  # data can be interleaved and prioritized.
14
14
  #
@@ -18,42 +18,44 @@ module Protocol
18
18
  # diagram below) and provide your application logic to handle request
19
19
  # and response processing.
20
20
  #
21
- # +--------+
22
- # send PP | | recv PP
23
- # ,--------| idle |--------.
24
- # / | | \
25
- # v +--------+ v
26
- # +----------+ | +----------+
27
- # | | | send H / | |
28
- # ,------| reserved | | recv H | reserved |------.
29
- # | | (local) | | | (remote) | |
30
- # | +----------+ v +----------+ |
31
- # | | +--------+ | |
32
- # | | recv ES | | send ES | |
33
- # | send H | ,-------| open |-------. | recv H |
34
- # | | / | | \ | |
35
- # | v v +--------+ v v |
36
- # | +----------+ | +----------+ |
37
- # | | half | | | half | |
38
- # | | closed | | send R / | closed | |
39
- # | | (remote) | | recv R | (local) | |
40
- # | +----------+ | +----------+ |
41
- # | | | | |
42
- # | | send ES / | recv ES / | |
43
- # | | send R / v send R / | |
44
- # | | recv R +--------+ recv R | |
45
- # | send R / `----------->| |<-----------' send R / |
46
- # | recv R | closed | recv R |
47
- # `----------------------->| |<----------------------'
48
- # +--------+
49
- #
50
- # send: endpoint sends this frame
51
- # recv: endpoint receives this frame
52
- #
53
- # H: HEADERS frame (with implied CONTINUATIONs)
54
- # PP: PUSH_PROMISE frame (with implied CONTINUATIONs)
55
- # ES: END_STREAM flag
56
- # R: RST_STREAM frame
21
+ # ```
22
+ # ┌────────┐
23
+ # send PP │ │ recv PP
24
+ # ┌──────────┤ idle ├──────────┐
25
+ # │ │
26
+ # └───┬────┘ ▼
27
+ # ┌──────────┐ │ ┌──────────┐
28
+ # │ │ send H / │ │
29
+ # ┌──────┼ reserved │ recv H │ reserved ├──────┐
30
+ # │ (local) │ │ (remote) │
31
+ # │ └───┬──────┘ ▼ └──────┬───┘ │
32
+ # │ ┌────────┐ │
33
+ # │ │ recv ES │ │ send ES │ │
34
+ # │ send H │ ┌─────────┤ open ├─────────┐ │ recv H │
35
+ # │ │
36
+ # ▼ ▼ └───┬────┘ ▼ ▼ │
37
+ # ┌──────────┐ ┌──────────┐
38
+ # │ half │ │ │ half │
39
+ # │ closed │ send R / │ closed │
40
+ # │ (remote) │ │ recv R │ (local) │
41
+ # │ └────┬─────┘ │ └─────┬────┘ │
42
+ # │ │ │
43
+ # send ES / recv ES /
44
+ # send R / ▼ send R / │
45
+ # │ │ recv R ┌────────┐ recv R │ │
46
+ # send R / └───────────►│ │◄───────────┘ send R / │
47
+ # │ recv R │ closed │ recv R │
48
+ # └───────────────────────►│ │◄───────────────────────┘
49
+ # └────────┘
50
+ # ```
51
+ #
52
+ # - `send`: endpoint sends this frame
53
+ # - `recv`: endpoint receives this frame
54
+ #
55
+ # - H: HEADERS frame (with implied CONTINUATIONs)
56
+ # - PP: PUSH_PROMISE frame (with implied CONTINUATIONs)
57
+ # - ES: END_STREAM flag
58
+ # - R: RST_STREAM frame
57
59
  #
58
60
  # State transition methods use a trailing "!".
59
61
  class Stream
@@ -219,10 +221,6 @@ module Protocol
219
221
  end
220
222
  end
221
223
 
222
- # The stream has been opened.
223
- def opened(error = nil)
224
- end
225
-
226
224
  def open!
227
225
  if @state == :idle
228
226
  @state = :open
@@ -230,8 +228,6 @@ module Protocol
230
228
  raise ProtocolError, "Cannot open stream in state: #{@state}"
231
229
  end
232
230
 
233
- self.opened
234
-
235
231
  return self
236
232
  end
237
233
 
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Protocol
7
7
  module HTTP2
8
- VERSION = "0.18.0"
8
+ VERSION = "0.19.0"
9
9
  end
10
10
  end
@@ -1,9 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'frame'
6
+ require_relative "frame"
7
7
 
8
8
  module Protocol
9
9
  module HTTP2
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # Released under the MIT License.
4
- # Copyright, 2019-2023, by Samuel Williams.
4
+ # Copyright, 2019-2024, by Samuel Williams.
5
5
 
6
- require_relative 'http2/version'
7
- require_relative 'http2/connection'
6
+ require_relative "http2/version"
7
+ require_relative "http2/connection"
data/readme.md CHANGED
@@ -99,8 +99,8 @@ We welcome contributions to this project.
99
99
 
100
100
  ### Developer Certificate of Origin
101
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.
102
+ In order to protect users of this project, we require all contributors to comply with the [Developer Certificate of Origin](https://developercertificate.org/). This ensures that all contributions are properly licensed and attributed.
103
103
 
104
- ### Contributor Covenant
104
+ ### Community Guidelines
105
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.
106
+ This project is best served by a collaborative and respectful environment. Treat each other professionally, respect differing viewpoints, and engage constructively. Harassment, discrimination, or harmful behavior is not tolerated. Communicate clearly, listen actively, and support one another. If any issues arise, please inform the project maintainers.
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.18.0
4
+ version: 0.19.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: 2024-06-10 00:00:00.000000000 Z
43
+ date: 2024-09-24 00:00:00.000000000 Z
44
44
  dependencies:
45
45
  - !ruby/object:Gem::Dependency
46
46
  name: protocol-hpack
@@ -121,7 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
121
121
  - !ruby/object:Gem::Version
122
122
  version: '0'
123
123
  requirements: []
124
- rubygems_version: 3.5.9
124
+ rubygems_version: 3.5.11
125
125
  signing_key:
126
126
  specification_version: 4
127
127
  summary: A low level implementation of the HTTP/2 protocol.
metadata.gz.sig CHANGED
Binary file