protocol-http2 0.13.3 → 0.14.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 +4 -4
- data/.github/workflows/development.yml +48 -0
- data/README.md +1 -1
- data/fuzz/framer/bake.rb +16 -0
- data/fuzz/framer/input/data.txt +0 -0
- data/fuzz/framer/script.rb +26 -0
- data/lib/protocol/http2/connection.rb +2 -1
- data/lib/protocol/http2/version.rb +1 -1
- metadata +6 -3
- data/.travis.yml +0 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4de8d97c24ba5f9560c2b73035952ed85b76b870f4901127fdeb2de1165d4b5
|
4
|
+
data.tar.gz: a671b0ca2f71e94234314e63082243cd09842e6f7b749344789a7a398ebb5e58
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
[](https://github.com/socketry/protocol-http2/actions?workflow=Development)
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
data/fuzz/framer/bake.rb
ADDED
@@ -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)
|
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.
|
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-
|
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
|