protocol-http2 0.13.3 → 0.14.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: 4a6caeb4809307d0b606060dd22e1fb5ae63c2230f4bc8cdabc95e90e180cea2
4
- data.tar.gz: ffb3aadc9b89df4e152f35d08d084169ab97ab106981dd9d5236c13e4b4e46bd
3
+ metadata.gz: a4de8d97c24ba5f9560c2b73035952ed85b76b870f4901127fdeb2de1165d4b5
4
+ data.tar.gz: a671b0ca2f71e94234314e63082243cd09842e6f7b749344789a7a398ebb5e58
5
5
  SHA512:
6
- metadata.gz: 400262421de3cc3b6fa0cc909d97db74544fb2147168f46df2b0c71a25160a22dd0c7a7bcc60c82ceae28c413952dcfaef4329498aab5a5fa0f4f353937a4c88
7
- data.tar.gz: 8f4a4ada1aa5033856e1c5abf4f05c4c1b558c618aca740008b416032cbb42b616839164fa120f248760ff9e9bec8be3c3896c78de5dee9f5a4d3d421f8ba0d4
6
+ metadata.gz: 0ce2490f4c6a11ed9ebda67805599808b4cfa185526f95ec50678a966b2e3ec696b4200dc66a45a47fa49fc1c69a9a491fd9e5ea077b3e6f6dcc8404628eac16
7
+ data.tar.gz: a004ddb89926464d85f59f61c5090f6f5f5470fedf6a4313cd15010dcd2e77a5f311960baae1a695857c0392a3ed4bad341f5e1f461afcce06cb1fd1b150013e
@@ -0,0 +1,48 @@
1
+ name: Development
2
+
3
+ on: [push, pull_request]
4
+
5
+ jobs:
6
+ test:
7
+ runs-on: ${{matrix.os}}-latest
8
+ continue-on-error: ${{matrix.experimental}}
9
+
10
+ strategy:
11
+ matrix:
12
+ experimental: [false]
13
+
14
+ os:
15
+ - ubuntu
16
+ - macos
17
+
18
+ ruby:
19
+ - 2.5
20
+ - 2.6
21
+ - 2.7
22
+
23
+ include:
24
+ # - experimental: true
25
+ # os: ubuntu
26
+ # ruby: truffleruby
27
+ # - experimental: true
28
+ # os: ubuntu
29
+ # ruby: jruby
30
+ - experimental: true
31
+ os: ubuntu
32
+ ruby: head
33
+ - experimental: true
34
+ os: ubuntu
35
+ ruby: 2.6
36
+ env: COVERAGE=PartialSummary,Coveralls
37
+
38
+ steps:
39
+ - uses: actions/checkout@v1
40
+ - uses: ruby/setup-ruby@v1
41
+ with:
42
+ ruby-version: ${{matrix.ruby}}
43
+
44
+ - name: Install dependencies
45
+ run: ${{matrix.env}} bundle install
46
+
47
+ - name: Run tests
48
+ run: ${{matrix.env}} bundle exec rspec
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Provides a low-level implementation of the HTTP/2 protocol.
4
4
 
5
- [![Build Status](https://travis-ci.com/socketry/protocol-http2.svg?branch=master)](https://travis-ci.com/socketry/protocol-http2?branch=master)
5
+ [![Actions Status](https://github.com/socketry/protocol-http2/workflows/Development/badge.svg)](https://github.com/socketry/protocol-http2/actions?workflow=Development)
6
6
 
7
7
  ## Installation
8
8
 
@@ -0,0 +1,16 @@
1
+
2
+ # Run the fuzz test.
3
+ def run
4
+ system("AFL_SKIP_BIN_CHECK=1 afl-fuzz -i input/ -o output/ -m 100 -- ruby script.rb")
5
+ end
6
+
7
+ def generate
8
+ require_relative '../../lib/protocol/http2/framer'
9
+
10
+ framer = Protocol::HTTP2::Framer.new($stdout)
11
+
12
+ frame = Protocol::HTTP2::DataFrame.new
13
+ frame.pack("Hello World")
14
+
15
+ framer.write_frame(frame)
16
+ end
Binary file
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'socket'
4
+ require_relative '../../lib/protocol/http2/framer'
5
+
6
+ def test
7
+ framer = Protocol::HTTP2::Framer.new($stdin)
8
+
9
+ while frame = framer.read_frame
10
+ pp frame
11
+ end
12
+ rescue EOFError
13
+ # Ignore.
14
+ end
15
+
16
+ if ENV["_"] =~ /afl/
17
+ require 'kisaten'
18
+
19
+ Kisaten.crash_at [Exception], [EOFError, Protocol::HTTP2::FrameSizeError, Protocol::HTTP2::ProtocolError], Signal.list['USR1']
20
+
21
+ while Kisaten.loop 10_000
22
+ test
23
+ end
24
+ else
25
+ test
26
+ end
@@ -99,8 +99,9 @@ module Protocol
99
99
  # The highest stream_id that has been successfully accepted by this connection.
100
100
  attr :remote_stream_id
101
101
 
102
+ # Whether the connection is effectively or actually closed.
102
103
  def closed?
103
- @state == :closed
104
+ @state == :closed || @framer.nil?
104
105
  end
105
106
 
106
107
  def delete(id)
@@ -20,6 +20,6 @@
20
20
 
21
21
  module Protocol
22
22
  module HTTP2
23
- VERSION = "0.13.3"
23
+ VERSION = "0.14.0"
24
24
  end
25
25
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: protocol-http2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.3
4
+ version: 0.14.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-08 00:00:00.000000000 Z
11
+ date: 2020-04-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: protocol-hpack
@@ -101,13 +101,16 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
+ - ".github/workflows/development.yml"
104
105
  - ".gitignore"
105
106
  - ".rspec"
106
- - ".travis.yml"
107
107
  - Gemfile
108
108
  - README.md
109
109
  - examples/http2/request.rb
110
110
  - examples/http2/requests.rb
111
+ - fuzz/framer/bake.rb
112
+ - fuzz/framer/input/data.txt
113
+ - fuzz/framer/script.rb
111
114
  - lib/protocol/http2.rb
112
115
  - lib/protocol/http2/client.rb
113
116
  - lib/protocol/http2/connection.rb
data/.travis.yml DELETED
@@ -1,22 +0,0 @@
1
- language: ruby
2
- dist: xenial
3
- cache: bundler
4
-
5
- script: bundle exec rspec
6
-
7
- matrix:
8
- include:
9
- - rvm: 2.5
10
- - rvm: 2.6
11
- - rvm: 2.7
12
- - rvm: 2.6
13
- env: COVERAGE=PartialSummary,Coveralls
14
- - rvm: 2.7
15
- - rvm: truffleruby
16
- - rvm: jruby-head
17
- env: JRUBY_OPTS="--debug -X+O"
18
- - rvm: ruby-head
19
- allow_failures:
20
- - rvm: truffleruby
21
- - rvm: ruby-head
22
- - rvm: jruby-head