tipi 0.42 → 0.47
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -0
- data/.github/workflows/test.yml +1 -3
- data/CHANGELOG.md +27 -0
- data/Gemfile +3 -1
- data/Gemfile.lock +35 -29
- data/README.md +184 -8
- data/Rakefile +1 -7
- data/benchmarks/bm_http1_parser.rb +45 -21
- data/bin/benchmark +0 -0
- data/bin/h1pd +0 -0
- data/bm.png +0 -0
- data/df/agent.rb +1 -1
- data/df/sample_agent.rb +2 -2
- data/df/server.rb +2 -0
- data/df/server_utils.rb +12 -15
- data/examples/hello.rb +5 -0
- data/examples/hello.ru +3 -3
- data/examples/http_server.js +1 -1
- data/examples/http_server_graceful.rb +1 -1
- data/examples/https_server.rb +41 -18
- data/examples/rack_server_forked.rb +26 -0
- data/examples/rack_server_https_forked.rb +1 -1
- data/examples/websocket_demo.rb +1 -1
- data/lib/tipi/acme.rb +51 -39
- data/lib/tipi/cli.rb +79 -16
- data/lib/tipi/config_dsl.rb +13 -13
- data/lib/tipi/configuration.rb +2 -2
- data/lib/tipi/controller/bare_polyphony.rb +0 -0
- data/lib/tipi/controller/bare_stock.rb +10 -0
- data/lib/tipi/controller/extensions.rb +37 -0
- data/lib/tipi/controller/stock_http1_adapter.rb +15 -0
- data/lib/tipi/controller/web_polyphony.rb +353 -0
- data/lib/tipi/controller/web_stock.rb +635 -0
- data/lib/tipi/controller.rb +12 -0
- data/lib/tipi/digital_fabric/agent.rb +3 -3
- data/lib/tipi/digital_fabric/agent_proxy.rb +11 -5
- data/lib/tipi/digital_fabric/executive.rb +1 -1
- data/lib/tipi/digital_fabric/protocol.rb +1 -1
- data/lib/tipi/digital_fabric/service.rb +12 -8
- data/lib/tipi/handler.rb +2 -2
- data/lib/tipi/http1_adapter.rb +36 -30
- data/lib/tipi/http2_adapter.rb +10 -10
- data/lib/tipi/http2_stream.rb +14 -15
- data/lib/tipi/rack_adapter.rb +2 -2
- data/lib/tipi/response_extensions.rb +1 -1
- data/lib/tipi/supervisor.rb +75 -0
- data/lib/tipi/version.rb +1 -1
- data/lib/tipi/websocket.rb +3 -3
- data/lib/tipi.rb +4 -83
- data/test/coverage.rb +2 -2
- data/test/helper.rb +0 -1
- data/test/test_http_server.rb +14 -14
- data/test/test_request.rb +1 -1
- data/tipi.gemspec +6 -7
- metadata +58 -53
- data/ext/tipi/extconf.rb +0 -13
- data/ext/tipi/http1_parser.c +0 -823
- data/ext/tipi/http1_parser.h +0 -18
- data/ext/tipi/tipi_ext.c +0 -5
- data/security/http1.rb +0 -12
- data/test/test_http1_parser.rb +0 -586
data/lib/tipi.rb
CHANGED
@@ -17,7 +17,7 @@ end
|
|
17
17
|
module Tipi
|
18
18
|
ALPN_PROTOCOLS = %w[h2 http/1.1].freeze
|
19
19
|
H2_PROTOCOL = 'h2'
|
20
|
-
|
20
|
+
|
21
21
|
class << self
|
22
22
|
def serve(host, port, opts = {}, &handler)
|
23
23
|
opts[:alpn_protocols] = ALPN_PROTOCOLS
|
@@ -26,7 +26,7 @@ module Tipi
|
|
26
26
|
ensure
|
27
27
|
server&.close
|
28
28
|
end
|
29
|
-
|
29
|
+
|
30
30
|
def listen(host, port, opts = {})
|
31
31
|
opts[:alpn_protocols] = ALPN_PROTOCOLS
|
32
32
|
Polyphony::Net.tcp_listen(host, port, opts).tap do |socket|
|
@@ -35,7 +35,7 @@ module Tipi
|
|
35
35
|
end
|
36
36
|
end
|
37
37
|
end
|
38
|
-
|
38
|
+
|
39
39
|
def accept_loop(server, opts, &handler)
|
40
40
|
server.accept_loop do |client|
|
41
41
|
spin { client_loop(client, opts, &handler) }
|
@@ -43,7 +43,7 @@ module Tipi
|
|
43
43
|
# disregard
|
44
44
|
end
|
45
45
|
end
|
46
|
-
|
46
|
+
|
47
47
|
def client_loop(client, opts, &handler)
|
48
48
|
client.no_delay if client.respond_to?(:no_delay)
|
49
49
|
adapter = protocol_adapter(client, opts)
|
@@ -62,84 +62,5 @@ module Tipi
|
|
62
62
|
def route(&block)
|
63
63
|
proc { |req| req.route(&block) }
|
64
64
|
end
|
65
|
-
|
66
|
-
CERTIFICATE_STORE_DEFAULT_DIR = File.expand_path('~/.tipi')
|
67
|
-
CERTIFICATE_STORE_DEFAULT_DB_PATH = File.join(
|
68
|
-
CERTIFICATE_STORE_DEFAULT_DIR, 'certificates.db'
|
69
|
-
)
|
70
|
-
|
71
|
-
def default_certificate_store
|
72
|
-
FileUtils.mkdir(CERTIFICATE_STORE_DEFAULT_DIR) rescue nil
|
73
|
-
Tipi::ACME::SQLiteCertificateStore.new(CERTIFICATE_STORE_DEFAULT_DB_PATH)
|
74
|
-
end
|
75
|
-
|
76
|
-
def full_service(
|
77
|
-
http_port: 10080,
|
78
|
-
https_port: 10443,
|
79
|
-
certificate_store: default_certificate_store,
|
80
|
-
app: nil, &block
|
81
|
-
)
|
82
|
-
app ||= block
|
83
|
-
raise "No app given" unless app
|
84
|
-
|
85
|
-
http_handler = ->(r) { r.redirect("https://#{r.host}#{r.path}") }
|
86
|
-
|
87
|
-
ctx = OpenSSL::SSL::SSLContext.new
|
88
|
-
# ctx.ciphers = 'ECDH+aRSA'
|
89
|
-
Polyphony::Net.setup_alpn(ctx, Tipi::ALPN_PROTOCOLS)
|
90
|
-
|
91
|
-
challenge_handler = Tipi::ACME::HTTPChallengeHandler.new
|
92
|
-
certificate_manager = Tipi::ACME::CertificateManager.new(
|
93
|
-
master_ctx: ctx,
|
94
|
-
store: certificate_store,
|
95
|
-
challenge_handler: challenge_handler
|
96
|
-
)
|
97
|
-
|
98
|
-
http_listener = spin do
|
99
|
-
opts = {
|
100
|
-
reuse_addr: true,
|
101
|
-
reuse_port: true,
|
102
|
-
dont_linger: true,
|
103
|
-
}
|
104
|
-
puts "Listening for HTTP on localhost:#{http_port}"
|
105
|
-
server = Polyphony::Net.tcp_listen('0.0.0.0', http_port, opts)
|
106
|
-
wrapped_handler = certificate_manager.challenge_routing_app(http_handler)
|
107
|
-
server.accept_loop do |client|
|
108
|
-
spin do
|
109
|
-
Tipi.client_loop(client, opts, &wrapped_handler)
|
110
|
-
rescue => e
|
111
|
-
puts "Uncaught error in HTTP listener: #{e.inspect}"
|
112
|
-
end
|
113
|
-
end
|
114
|
-
ensure
|
115
|
-
server.close
|
116
|
-
end
|
117
|
-
|
118
|
-
https_listener = spin do
|
119
|
-
opts = {
|
120
|
-
reuse_addr: true,
|
121
|
-
reuse_port: true,
|
122
|
-
dont_linger: true,
|
123
|
-
secure_context: ctx,
|
124
|
-
}
|
125
|
-
|
126
|
-
puts "Listening for HTTPS on localhost:#{https_port}"
|
127
|
-
server = Polyphony::Net.tcp_listen('0.0.0.0', https_port, opts)
|
128
|
-
loop do
|
129
|
-
client = server.accept
|
130
|
-
spin do
|
131
|
-
Tipi.client_loop(client, opts, &app)
|
132
|
-
rescue => e
|
133
|
-
puts "Uncaught error in HTTPS listener: #{e.inspect}"
|
134
|
-
end
|
135
|
-
rescue OpenSSL::SSL::SSLError, SystemCallError, TypeError
|
136
|
-
# ignore
|
137
|
-
end
|
138
|
-
ensure
|
139
|
-
server.close
|
140
|
-
end
|
141
|
-
|
142
|
-
Fiber.await(http_listener, https_listener)
|
143
|
-
end
|
144
65
|
end
|
145
66
|
end
|
data/test/coverage.rb
CHANGED
@@ -26,10 +26,10 @@ module Coverage
|
|
26
26
|
@result = {}
|
27
27
|
trace = TracePoint.new(:line) do |tp|
|
28
28
|
next if tp.path =~ /\(/
|
29
|
-
|
29
|
+
|
30
30
|
absolute = File.expand_path(tp.path)
|
31
31
|
next unless LIB_FILES.include?(absolute)# =~ /^#{LIB_DIR}/
|
32
|
-
|
32
|
+
|
33
33
|
@result[absolute] ||= relevant_lines_for_filename(absolute)
|
34
34
|
@result[absolute][tp.lineno - 1] = 1
|
35
35
|
end
|
data/test/helper.rb
CHANGED
data/test/test_http_server.rb
CHANGED
@@ -4,7 +4,7 @@ require_relative 'helper'
|
|
4
4
|
require 'tipi'
|
5
5
|
|
6
6
|
class String
|
7
|
-
def
|
7
|
+
def crlf_lines
|
8
8
|
gsub "\n", "\r\n"
|
9
9
|
end
|
10
10
|
end
|
@@ -33,7 +33,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
33
33
|
connection << "GET / HTTP/1.0\r\n\r\n"
|
34
34
|
|
35
35
|
response = connection.readpartial(8192)
|
36
|
-
expected = <<~HTTP.chomp.
|
36
|
+
expected = <<~HTTP.chomp.crlf_lines.chomp
|
37
37
|
HTTP/1.1 200
|
38
38
|
Content-Length: 13
|
39
39
|
|
@@ -51,7 +51,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
51
51
|
connection << "GET / HTTP/1.1\r\n\r\n"
|
52
52
|
|
53
53
|
response = connection.readpartial(8192)
|
54
|
-
expected = <<~HTTP.
|
54
|
+
expected = <<~HTTP.crlf_lines.chomp
|
55
55
|
HTTP/1.1 200
|
56
56
|
Content-Length: 13
|
57
57
|
|
@@ -73,7 +73,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
73
73
|
connection << "GET / HTTP/1.1\r\n\r\n"
|
74
74
|
response = connection.readpartial(8192)
|
75
75
|
assert !connection.eof?
|
76
|
-
expected = <<~HTTP.
|
76
|
+
expected = <<~HTTP.crlf_lines.chomp
|
77
77
|
HTTP/1.1 200
|
78
78
|
Content-Length: 2
|
79
79
|
|
@@ -100,7 +100,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
100
100
|
sleep 0.01
|
101
101
|
response = connection.readpartial(8192)
|
102
102
|
|
103
|
-
expected = <<~HTTP.
|
103
|
+
expected = <<~HTTP.crlf_lines.chomp
|
104
104
|
HTTP/1.1 200
|
105
105
|
Content-Length: 13
|
106
106
|
|
@@ -125,7 +125,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
125
125
|
req.finish
|
126
126
|
end
|
127
127
|
|
128
|
-
connection << <<~HTTP.
|
128
|
+
connection << <<~HTTP.crlf_lines
|
129
129
|
POST / HTTP/1.1
|
130
130
|
Transfer-Encoding: chunked
|
131
131
|
|
@@ -151,7 +151,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
151
151
|
|
152
152
|
response = connection.readpartial(8192)
|
153
153
|
|
154
|
-
expected = <<~HTTP.
|
154
|
+
expected = <<~HTTP.crlf_lines
|
155
155
|
HTTP/1.1 200
|
156
156
|
Transfer-Encoding: chunked
|
157
157
|
|
@@ -172,7 +172,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
172
172
|
upgrade: {
|
173
173
|
echo: lambda do |adapter, _headers|
|
174
174
|
conn = adapter.conn
|
175
|
-
conn << <<~HTTP.
|
175
|
+
conn << <<~HTTP.crlf_lines
|
176
176
|
HTTP/1.1 101 Switching Protocols
|
177
177
|
Upgrade: echo
|
178
178
|
Connection: Upgrade
|
@@ -192,7 +192,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
192
192
|
connection << "GET / HTTP/1.1\r\n\r\n"
|
193
193
|
response = connection.readpartial(8192)
|
194
194
|
assert !connection.eof?
|
195
|
-
expected = <<~HTTP.
|
195
|
+
expected = <<~HTTP.crlf_lines.chomp
|
196
196
|
HTTP/1.1 200
|
197
197
|
Content-Length: 2
|
198
198
|
|
@@ -200,7 +200,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
200
200
|
HTTP
|
201
201
|
assert_equal(expected, response)
|
202
202
|
|
203
|
-
connection << <<~HTTP.
|
203
|
+
connection << <<~HTTP.crlf_lines
|
204
204
|
GET / HTTP/1.1
|
205
205
|
Upgrade: echo
|
206
206
|
Connection: upgrade
|
@@ -210,7 +210,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
210
210
|
snooze
|
211
211
|
response = connection.readpartial(8192)
|
212
212
|
assert !connection.eof?
|
213
|
-
expected = <<~HTTP.
|
213
|
+
expected = <<~HTTP.crlf_lines
|
214
214
|
HTTP/1.1 101 Switching Protocols
|
215
215
|
Upgrade: echo
|
216
216
|
Connection: Upgrade
|
@@ -228,7 +228,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
228
228
|
|
229
229
|
connection.close
|
230
230
|
assert !done
|
231
|
-
|
231
|
+
|
232
232
|
sleep 0.01
|
233
233
|
assert done
|
234
234
|
end
|
@@ -251,7 +251,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
251
251
|
count = 0
|
252
252
|
|
253
253
|
connection << "GET / HTTP/1.1\r\n\r\n"
|
254
|
-
|
254
|
+
|
255
255
|
while (data = connection.read(chunk_size))
|
256
256
|
response << data
|
257
257
|
count += 1
|
@@ -259,7 +259,7 @@ class HTTP1ServerTest < MiniTest::Test
|
|
259
259
|
end
|
260
260
|
|
261
261
|
chunks = "#{chunk_size.to_s(16)}\n#{'*' * chunk_size}\n" * chunk_count
|
262
|
-
expected = <<~HTTP.
|
262
|
+
expected = <<~HTTP.crlf_lines
|
263
263
|
HTTP/1.1 200
|
264
264
|
Transfer-Encoding: chunked
|
265
265
|
|
data/test/test_request.rb
CHANGED
@@ -39,7 +39,7 @@ class RequestHeadersTest < MiniTest::Test
|
|
39
39
|
assert_equal 'blah.com', req.headers['host']
|
40
40
|
assert_equal 'bar', req.headers['foo']
|
41
41
|
assert_equal ['1', '2', '3'], req.headers['hi']
|
42
|
-
assert_equal '
|
42
|
+
assert_equal 'GET', req.headers[':method']
|
43
43
|
assert_equal '/titi', req.headers[':path']
|
44
44
|
end
|
45
45
|
|
data/tipi.gemspec
CHANGED
@@ -14,16 +14,17 @@ Gem::Specification.new do |s|
|
|
14
14
|
}
|
15
15
|
s.rdoc_options = ["--title", "tipi", "--main", "README.md"]
|
16
16
|
s.extra_rdoc_files = ["README.md"]
|
17
|
-
s.extensions = ["ext/tipi/extconf.rb"]
|
18
17
|
s.require_paths = ["lib"]
|
19
18
|
s.required_ruby_version = '>= 2.6'
|
20
19
|
|
21
20
|
s.executables = ['tipi']
|
22
21
|
|
23
|
-
s.add_runtime_dependency 'polyphony', '~>0.
|
22
|
+
s.add_runtime_dependency 'polyphony', '~>0.71'
|
23
|
+
s.add_runtime_dependency 'ever', '~>0.1'
|
24
24
|
s.add_runtime_dependency 'qeweney', '~>0.14'
|
25
25
|
s.add_runtime_dependency 'extralite', '~>1.2'
|
26
|
-
|
26
|
+
s.add_runtime_dependency 'h1p', '~>0.3'
|
27
|
+
|
27
28
|
s.add_runtime_dependency 'http-2', '~>0.11'
|
28
29
|
s.add_runtime_dependency 'rack', '>=2.0.8', '<2.3.0'
|
29
30
|
s.add_runtime_dependency 'websocket', '~>1.2.8'
|
@@ -33,12 +34,10 @@ Gem::Specification.new do |s|
|
|
33
34
|
# for digital fabric
|
34
35
|
s.add_runtime_dependency 'msgpack', '~>1.4.2'
|
35
36
|
|
36
|
-
s.add_development_dependency 'rake
|
37
|
-
s.add_development_dependency 'rake', '~>12.3.3'
|
37
|
+
s.add_development_dependency 'rake', '~>13.0.6'
|
38
38
|
s.add_development_dependency 'minitest', '~>5.11.3'
|
39
|
-
s.add_development_dependency 'minitest-reporters', '~>1.4.2'
|
40
39
|
s.add_development_dependency 'simplecov', '~>0.17.1'
|
40
|
+
s.add_development_dependency 'memory_profiler', '~>1.0.0'
|
41
41
|
|
42
42
|
s.add_development_dependency 'cuba', '~>3.9.3'
|
43
|
-
s.add_development_dependency 'http_parser.rb', '0.7.0'
|
44
43
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tipi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.47'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sharon Rosner
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: polyphony
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '0.
|
19
|
+
version: '0.71'
|
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: '0.
|
26
|
+
version: '0.71'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: ever
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.1'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: qeweney
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +66,20 @@ dependencies:
|
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '1.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: h1p
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0.3'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0.3'
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: http-2
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -142,34 +170,20 @@ dependencies:
|
|
142
170
|
- - "~>"
|
143
171
|
- !ruby/object:Gem::Version
|
144
172
|
version: 1.4.2
|
145
|
-
- !ruby/object:Gem::Dependency
|
146
|
-
name: rake-compiler
|
147
|
-
requirement: !ruby/object:Gem::Requirement
|
148
|
-
requirements:
|
149
|
-
- - '='
|
150
|
-
- !ruby/object:Gem::Version
|
151
|
-
version: 1.1.1
|
152
|
-
type: :development
|
153
|
-
prerelease: false
|
154
|
-
version_requirements: !ruby/object:Gem::Requirement
|
155
|
-
requirements:
|
156
|
-
- - '='
|
157
|
-
- !ruby/object:Gem::Version
|
158
|
-
version: 1.1.1
|
159
173
|
- !ruby/object:Gem::Dependency
|
160
174
|
name: rake
|
161
175
|
requirement: !ruby/object:Gem::Requirement
|
162
176
|
requirements:
|
163
177
|
- - "~>"
|
164
178
|
- !ruby/object:Gem::Version
|
165
|
-
version:
|
179
|
+
version: 13.0.6
|
166
180
|
type: :development
|
167
181
|
prerelease: false
|
168
182
|
version_requirements: !ruby/object:Gem::Requirement
|
169
183
|
requirements:
|
170
184
|
- - "~>"
|
171
185
|
- !ruby/object:Gem::Version
|
172
|
-
version:
|
186
|
+
version: 13.0.6
|
173
187
|
- !ruby/object:Gem::Dependency
|
174
188
|
name: minitest
|
175
189
|
requirement: !ruby/object:Gem::Requirement
|
@@ -185,33 +199,33 @@ dependencies:
|
|
185
199
|
- !ruby/object:Gem::Version
|
186
200
|
version: 5.11.3
|
187
201
|
- !ruby/object:Gem::Dependency
|
188
|
-
name:
|
202
|
+
name: simplecov
|
189
203
|
requirement: !ruby/object:Gem::Requirement
|
190
204
|
requirements:
|
191
205
|
- - "~>"
|
192
206
|
- !ruby/object:Gem::Version
|
193
|
-
version:
|
207
|
+
version: 0.17.1
|
194
208
|
type: :development
|
195
209
|
prerelease: false
|
196
210
|
version_requirements: !ruby/object:Gem::Requirement
|
197
211
|
requirements:
|
198
212
|
- - "~>"
|
199
213
|
- !ruby/object:Gem::Version
|
200
|
-
version:
|
214
|
+
version: 0.17.1
|
201
215
|
- !ruby/object:Gem::Dependency
|
202
|
-
name:
|
216
|
+
name: memory_profiler
|
203
217
|
requirement: !ruby/object:Gem::Requirement
|
204
218
|
requirements:
|
205
219
|
- - "~>"
|
206
220
|
- !ruby/object:Gem::Version
|
207
|
-
version: 0.
|
221
|
+
version: 1.0.0
|
208
222
|
type: :development
|
209
223
|
prerelease: false
|
210
224
|
version_requirements: !ruby/object:Gem::Requirement
|
211
225
|
requirements:
|
212
226
|
- - "~>"
|
213
227
|
- !ruby/object:Gem::Version
|
214
|
-
version: 0.
|
228
|
+
version: 1.0.0
|
215
229
|
- !ruby/object:Gem::Dependency
|
216
230
|
name: cuba
|
217
231
|
requirement: !ruby/object:Gem::Requirement
|
@@ -226,29 +240,15 @@ dependencies:
|
|
226
240
|
- - "~>"
|
227
241
|
- !ruby/object:Gem::Version
|
228
242
|
version: 3.9.3
|
229
|
-
|
230
|
-
name: http_parser.rb
|
231
|
-
requirement: !ruby/object:Gem::Requirement
|
232
|
-
requirements:
|
233
|
-
- - '='
|
234
|
-
- !ruby/object:Gem::Version
|
235
|
-
version: 0.7.0
|
236
|
-
type: :development
|
237
|
-
prerelease: false
|
238
|
-
version_requirements: !ruby/object:Gem::Requirement
|
239
|
-
requirements:
|
240
|
-
- - '='
|
241
|
-
- !ruby/object:Gem::Version
|
242
|
-
version: 0.7.0
|
243
|
-
description:
|
243
|
+
description:
|
244
244
|
email: sharon@noteflakes.com
|
245
245
|
executables:
|
246
246
|
- tipi
|
247
|
-
extensions:
|
248
|
-
- ext/tipi/extconf.rb
|
247
|
+
extensions: []
|
249
248
|
extra_rdoc_files:
|
250
249
|
- README.md
|
251
250
|
files:
|
251
|
+
- ".github/FUNDING.yml"
|
252
252
|
- ".github/workflows/test.yml"
|
253
253
|
- ".gitignore"
|
254
254
|
- CHANGELOG.md
|
@@ -262,6 +262,7 @@ files:
|
|
262
262
|
- bin/benchmark
|
263
263
|
- bin/h1pd
|
264
264
|
- bin/tipi
|
265
|
+
- bm.png
|
265
266
|
- df/agent.rb
|
266
267
|
- df/etc_benchmark.rb
|
267
268
|
- df/multi_agent_supervisor.rb
|
@@ -278,6 +279,7 @@ files:
|
|
278
279
|
- examples/cuba.ru
|
279
280
|
- examples/full_service.rb
|
280
281
|
- examples/hanami-api.ru
|
282
|
+
- examples/hello.rb
|
281
283
|
- examples/hello.ru
|
282
284
|
- examples/http1_parser.rb
|
283
285
|
- examples/http_request_ws_server.rb
|
@@ -298,6 +300,7 @@ files:
|
|
298
300
|
- examples/https_server_forked.rb
|
299
301
|
- examples/https_wss_server.rb
|
300
302
|
- examples/rack_server.rb
|
303
|
+
- examples/rack_server_forked.rb
|
301
304
|
- examples/rack_server_https.rb
|
302
305
|
- examples/rack_server_https_forked.rb
|
303
306
|
- examples/routing_server.rb
|
@@ -308,15 +311,18 @@ files:
|
|
308
311
|
- examples/websocket_server.rb
|
309
312
|
- examples/ws_page.html
|
310
313
|
- examples/wss_page.html
|
311
|
-
- ext/tipi/extconf.rb
|
312
|
-
- ext/tipi/http1_parser.c
|
313
|
-
- ext/tipi/http1_parser.h
|
314
|
-
- ext/tipi/tipi_ext.c
|
315
314
|
- lib/tipi.rb
|
316
315
|
- lib/tipi/acme.rb
|
317
316
|
- lib/tipi/cli.rb
|
318
317
|
- lib/tipi/config_dsl.rb
|
319
318
|
- lib/tipi/configuration.rb
|
319
|
+
- lib/tipi/controller.rb
|
320
|
+
- lib/tipi/controller/bare_polyphony.rb
|
321
|
+
- lib/tipi/controller/bare_stock.rb
|
322
|
+
- lib/tipi/controller/extensions.rb
|
323
|
+
- lib/tipi/controller/stock_http1_adapter.rb
|
324
|
+
- lib/tipi/controller/web_polyphony.rb
|
325
|
+
- lib/tipi/controller/web_stock.rb
|
320
326
|
- lib/tipi/digital_fabric.rb
|
321
327
|
- lib/tipi/digital_fabric/agent.rb
|
322
328
|
- lib/tipi/digital_fabric/agent_proxy.rb
|
@@ -331,14 +337,13 @@ files:
|
|
331
337
|
- lib/tipi/http2_stream.rb
|
332
338
|
- lib/tipi/rack_adapter.rb
|
333
339
|
- lib/tipi/response_extensions.rb
|
340
|
+
- lib/tipi/supervisor.rb
|
334
341
|
- lib/tipi/version.rb
|
335
342
|
- lib/tipi/websocket.rb
|
336
|
-
- security/http1.rb
|
337
343
|
- test/coverage.rb
|
338
344
|
- test/eg.rb
|
339
345
|
- test/helper.rb
|
340
346
|
- test/run.rb
|
341
|
-
- test/test_http1_parser.rb
|
342
347
|
- test/test_http_server.rb
|
343
348
|
- test/test_request.rb
|
344
349
|
- tipi.gemspec
|
@@ -347,7 +352,7 @@ licenses:
|
|
347
352
|
- MIT
|
348
353
|
metadata:
|
349
354
|
source_code_uri: https://github.com/digital-fabric/tipi
|
350
|
-
post_install_message:
|
355
|
+
post_install_message:
|
351
356
|
rdoc_options:
|
352
357
|
- "--title"
|
353
358
|
- tipi
|
@@ -366,8 +371,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
366
371
|
- !ruby/object:Gem::Version
|
367
372
|
version: '0'
|
368
373
|
requirements: []
|
369
|
-
rubygems_version: 3.
|
370
|
-
signing_key:
|
374
|
+
rubygems_version: 3.3.3
|
375
|
+
signing_key:
|
371
376
|
specification_version: 4
|
372
377
|
summary: Tipi - the All-in-one Web Server for Ruby Apps
|
373
378
|
test_files: []
|
data/ext/tipi/extconf.rb
DELETED
@@ -1,13 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'rubygems'
|
4
|
-
require 'mkmf'
|
5
|
-
|
6
|
-
require_relative '../../security/http1'
|
7
|
-
|
8
|
-
$CFLAGS << " -Wno-format-security"
|
9
|
-
CONFIG['optflags'] << ' -fno-strict-aliasing' unless RUBY_PLATFORM =~ /mswin/
|
10
|
-
Tipi::HTTP1_LIMITS.each { |k, v| $defs << "-D#{k.upcase}=#{v}" }
|
11
|
-
|
12
|
-
dir_config 'tipi_ext'
|
13
|
-
create_makefile 'tipi_ext'
|