yahns 1.14.1 → 1.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.document +2 -0
- data/.gitignore +0 -1
- data/.olddoc.yml +3 -2
- data/Documentation/GNUmakefile +1 -1
- data/Documentation/design_notes.txt +6 -3
- data/Documentation/yahns-rackup.pod +7 -3
- data/Documentation/yahns.pod +1 -1
- data/Documentation/yahns_config.pod +10 -10
- data/GIT-VERSION-FILE +1 -1
- data/GIT-VERSION-GEN +3 -3
- data/HACKING +13 -13
- data/NEWS +982 -829
- data/README +11 -12
- data/Rakefile +121 -5
- data/examples/https_proxy_pass.conf.rb +36 -0
- data/examples/logrotate.conf +1 -1
- data/examples/proxy_pass.ru +11 -0
- data/extras/autoindex.rb +20 -4
- data/extras/exec_cgi.rb +38 -24
- data/extras/proxy_pass.rb +7 -6
- data/extras/try_gzip_static.rb +4 -1
- data/lib/yahns/acceptor.rb +3 -3
- data/lib/yahns/chunk_body.rb +2 -1
- data/lib/yahns/config.rb +10 -5
- data/lib/yahns/daemon.rb +0 -1
- data/lib/yahns/http_client.rb +28 -18
- data/lib/yahns/http_response.rb +3 -4
- data/lib/yahns/openssl_client.rb +33 -11
- data/lib/yahns/proxy_http_response.rb +3 -1
- data/lib/yahns/proxy_pass.rb +68 -10
- data/lib/yahns/queue_epoll.rb +4 -0
- data/lib/yahns/queue_kqueue.rb +0 -6
- data/lib/yahns/queue_quitter_pipe.rb +4 -1
- data/lib/yahns/rackup_handler.rb +3 -7
- data/lib/yahns/server.rb +47 -27
- data/lib/yahns/server_mp.rb +3 -4
- data/lib/yahns/sigevent_efd.rb +0 -1
- data/lib/yahns/sigevent_pipe.rb +13 -6
- data/lib/yahns/socket_helper.rb +1 -1
- data/lib/yahns/stream_input.rb +3 -2
- data/lib/yahns/tee_input.rb +1 -3
- data/lib/yahns/version.rb +1 -1
- data/lib/yahns/wbuf.rb +10 -3
- data/lib/yahns/worker.rb +8 -0
- data/lib/yahns.rb +12 -7
- data/man/yahns-rackup.1 +17 -17
- data/man/yahns.1 +11 -15
- data/man/yahns_config.5 +31 -31
- data/test/helper.rb +6 -2
- data/test/server_helper.rb +20 -5
- data/test/test_bin.rb +33 -30
- data/test/test_config.rb +2 -2
- data/test/test_extras_exec_cgi.rb +24 -1
- data/test/test_extras_try_gzip_static.rb +1 -1
- data/test/test_mt_accept.rb +0 -2
- data/test/test_proxy_pass.rb +1 -2
- data/test/test_proxy_pass_no_buffering.rb +1 -1
- data/test/test_rack_env.rb +58 -0
- data/test/test_serve_static.rb +0 -1
- data/test/test_server.rb +1 -4
- data/test/test_ssl.rb +2 -0
- data/test/test_unix_socket.rb +1 -3
- data/test/test_wbuf.rb +1 -1
- data/yahns.gemspec +8 -5
- metadata +12 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: '0318100b814550d192110790944b552f4aba4a79e363f7a932c7a86c21335728'
|
4
|
+
data.tar.gz: b8af746d6ffe65df3121b06fa42effa8b29ff9c1b206c67daabfbe8774e47bf7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cfcf4ef901f640e40c5343f33505eddae6ab32bc95a08c7225cb239cfff08b33266b737497481467588f9e8be70e88f4c2f4fa95d64312c02d19d813a3877bec
|
7
|
+
data.tar.gz: f21048f67209face645bef2a0f9018382b79aa93abd9d780ec05095a6557252ce1bc129e72fb04d74cd61c60caa75f64e7d147cc73297fad4c66394329b35125
|
data/.document
ADDED
data/.gitignore
CHANGED
data/.olddoc.yml
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
---
|
2
2
|
cgit_url: https://yhbt.net/yahns.git
|
3
|
-
git_url:
|
3
|
+
git_url: https://yhbt.net/yahns.git
|
4
4
|
rdoc_url: https://yhbt.net/yahns/
|
5
5
|
ml_url: https://yhbt.net/yahns-public/
|
6
6
|
public_email: yahns-public@yhbt.net
|
7
|
-
|
7
|
+
nntp_url:
|
8
|
+
- nntp://news.public-inbox.org/inbox.comp.lang.ruby.yahns
|
data/Documentation/GNUmakefile
CHANGED
@@ -17,9 +17,12 @@ socket we have inside the kernel.
|
|
17
17
|
Each listen queue has a dedicated thread pool running _blocking_
|
18
18
|
accept(2) (or accept4(2)) syscall in a loop. We use dedicated threads
|
19
19
|
and blocking accept to benefit from "wake-one" behavior in the Linux
|
20
|
-
kernel. By default, this thread pool only has thread per-process, doing
|
20
|
+
kernel. By default, this thread pool only has one thread per-process, doing
|
21
21
|
nothing but accepting sockets and injecting into to the event queue
|
22
|
-
(used by epoll or kqueue).
|
22
|
+
(used by epoll or kqueue) so a worker thread pool can pick them up.
|
23
|
+
|
24
|
+
This design makes EPOLLEXCLUSIVE in Linux 4.5+ unnecessary to us,
|
25
|
+
our listen sockets are never registered with epoll or kqueue.
|
23
26
|
|
24
27
|
worker thread pool
|
25
28
|
------------------
|
@@ -38,7 +41,7 @@ allows us to guarantee exclusive access to a client socket without
|
|
38
41
|
additional locks managed in userspace.
|
39
42
|
|
40
43
|
Idle threads will sit performing epoll_wait(2) (or kevent(2))
|
41
|
-
indefinitely until a socket is reported as "ready" by the kernel.
|
44
|
+
indefinitely until a client socket is reported as "ready" by the kernel.
|
42
45
|
|
43
46
|
queue flow
|
44
47
|
----------
|
@@ -40,6 +40,10 @@ and PATH is meant to be a path to a UNIX domain socket.
|
|
40
40
|
Defaults to "0.0.0.0:9292" (all addresses on TCP port 9292).
|
41
41
|
Multiple addresses may be separated with commas.
|
42
42
|
|
43
|
+
For systemd users, a special value of "inherit" may be specified
|
44
|
+
to inherit FDs using the LISTEN_FDS and LISTEN_PID environment
|
45
|
+
variables described in L<sd_listen_fds(3)>
|
46
|
+
|
43
47
|
=item -O stderr_path=PATHNAME
|
44
48
|
|
45
49
|
Allow redirecting $stderr to a given path. Unlike doing this from
|
@@ -162,13 +166,13 @@ See rackup documentation for more details.
|
|
162
166
|
=head1 CONTACT
|
163
167
|
|
164
168
|
All feedback welcome via plain-text mail to L<mailto:yahns-public@yhbt.net>
|
165
|
-
No subscription is necessary to
|
166
|
-
|
169
|
+
No subscription is necessary to email us.
|
170
|
+
Mail archives are available at L<https://yhbt.net/yahns-public/>
|
167
171
|
|
168
172
|
=head1 COPYRIGHT
|
169
173
|
|
170
174
|
Copyright (C) 2013-2016 all contributors L<mailto:yahns-public@yhbt.net>
|
171
|
-
License: GPL-3.0+ L<
|
175
|
+
License: GPL-3.0+ L<https://www.gnu.org/licenses/gpl-3.0.txt>
|
172
176
|
|
173
177
|
=head1 SEE ALSO
|
174
178
|
|
data/Documentation/yahns.pod
CHANGED
@@ -83,7 +83,7 @@ See L<yahns_config(5)> for documentation on the configuration file format.
|
|
83
83
|
=head1 CONTACT
|
84
84
|
|
85
85
|
All feedback welcome via plain-text mail to L<mailto:yahns-public@yhbt.net>
|
86
|
-
No subscription is necessary to
|
86
|
+
No subscription is necessary to email us.
|
87
87
|
Mail archives are available at L<https://yhbt.net/yahns-public/>
|
88
88
|
|
89
89
|
=head1 COPYRIGHT
|
@@ -427,7 +427,7 @@ To enable TLS connections, you must configure this yourself.
|
|
427
427
|
See documentation for OpenSSL::SSL::SSLContext
|
428
428
|
for more information:
|
429
429
|
|
430
|
-
L<
|
430
|
+
L<https://docs.ruby-lang.org/en/trunk/OpenSSL/SSL/SSLContext.html>
|
431
431
|
|
432
432
|
Default: none
|
433
433
|
|
@@ -436,22 +436,22 @@ An example which seems to work is:
|
|
436
436
|
require 'openssl'
|
437
437
|
ssl_ctx = OpenSSL::SSL::SSLContext.new
|
438
438
|
ssl_ctx.cert = OpenSSL::X509::Certificate.new(
|
439
|
-
|
439
|
+
File.read('/etc/ssl/certs/example.crt')
|
440
440
|
)
|
441
441
|
ssl_ctx.extra_chain_cert = [
|
442
442
|
OpenSSL::X509::Certificate.new(
|
443
|
-
|
443
|
+
File.read('/etc/ssl/certs/chain.crt')
|
444
444
|
)
|
445
445
|
]
|
446
446
|
ssl_ctx.key = OpenSSL::PKey::RSA.new(
|
447
|
-
|
447
|
+
File.read('/etc/ssl/private/example.key')
|
448
448
|
)
|
449
449
|
|
450
450
|
# use defaults provided by Ruby on top of OpenSSL,
|
451
|
-
# but disable client certificate verification as it is rare:
|
451
|
+
# but disable client certificate verification as it is rare for servers:
|
452
452
|
ssl_ctx.set_params(verify_mode: OpenSSL::SSL::VERIFY_NONE)
|
453
453
|
|
454
|
-
# Built-in session cache (only
|
454
|
+
# Built-in session cache (only useful if worker_processes is nil or 1)
|
455
455
|
ssl_ctx.session_cache_mode = OpenSSL::SSL::SSLContext::SESSION_CACHE_SERVER
|
456
456
|
|
457
457
|
app(:rack, "/path/to/my/app/config.ru") do
|
@@ -656,18 +656,18 @@ compatibility.
|
|
656
656
|
|
657
657
|
See the examples/ directory in the git source tree.
|
658
658
|
|
659
|
-
git clone
|
659
|
+
git clone https://yhbt.net/yahns.git
|
660
660
|
|
661
661
|
=head1 CONTACT
|
662
662
|
|
663
663
|
All feedback welcome via plain-text mail to L<mailto:yahns-public@yhbt.net>
|
664
|
-
No subscription is necessary to
|
665
|
-
|
664
|
+
No subscription is necessary to email us.
|
665
|
+
Mail archives are available at L<https://yhbt.net/yahns-public/>
|
666
666
|
|
667
667
|
=head1 COPYRIGHT
|
668
668
|
|
669
669
|
Copyright (C) 2013-2016 all contributors L<mailto:yahns-public@yhbt.net>
|
670
|
-
License: GPL-3.0+ L<
|
670
|
+
License: GPL-3.0+ L<https://www.gnu.org/licenses/gpl-3.0.txt>
|
671
671
|
|
672
672
|
=head1 SEE ALSO
|
673
673
|
|
data/GIT-VERSION-FILE
CHANGED
@@ -1 +1 @@
|
|
1
|
-
VERSION = 1.
|
1
|
+
VERSION = 1.18.0
|
data/GIT-VERSION-GEN
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
# Copyright (C)
|
3
|
-
# License: GPL-3.0+
|
2
|
+
# Copyright (C) all contributors <yahns-public@yhbt.net>
|
3
|
+
# License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|
4
4
|
# frozen_string_literal: true
|
5
5
|
CONSTANT = "Yahns::VERSION"
|
6
6
|
RVF = "lib/yahns/version.rb"
|
7
7
|
GVF = "GIT-VERSION-FILE"
|
8
|
-
DEF_VER = "v1.
|
8
|
+
DEF_VER = "v1.18.0"
|
9
9
|
vn = DEF_VER.dup
|
10
10
|
|
11
11
|
# First see if there is a version file (included in release tarballs),
|
data/HACKING
CHANGED
@@ -2,14 +2,14 @@ development dependencies
|
|
2
2
|
------------------------
|
3
3
|
|
4
4
|
* minitest RubyGem (version 4 or 5, standard in Ruby 2.0+)
|
5
|
-
* curl -
|
5
|
+
* curl - https://curl.haxx.se/ - we don't trust our own Ruby abilities :>
|
6
6
|
* dd(1) - standard POSIX tool - to feed curl
|
7
|
-
* ab -
|
7
|
+
* ab - https://httpd.apache.org/ - for concurrent testing
|
8
8
|
* GNU make - https://www.gnu.org/software/make/
|
9
|
-
* git -
|
10
|
-
* ruby -
|
9
|
+
* git - https://www.git-scm.com/
|
10
|
+
* ruby - https://www.ruby-lang.org/en/
|
11
11
|
|
12
|
-
git clone
|
12
|
+
git clone https://yhbt.net/yahns.git
|
13
13
|
|
14
14
|
tests
|
15
15
|
-----
|
@@ -42,14 +42,14 @@ installing from git
|
|
42
42
|
contact
|
43
43
|
-------
|
44
44
|
|
45
|
-
We use git(7) and develop yahns
|
46
|
-
|
47
|
-
|
48
|
-
formatted using git-request-pull(1).
|
45
|
+
We use git(7) and develop yahns using email like git.git hackers do.
|
46
|
+
Please send patches via git-send-email(1) to us at <yahns-public@yhbt.net>.
|
47
|
+
Pull requests should be formatted using git-request-pull(1).
|
49
48
|
|
50
|
-
|
51
|
-
|
52
|
-
|
49
|
+
All mail is archived publically at: https://yhbt.net/yahns-public/
|
50
|
+
Anonymous contributions will always be welcome.
|
51
|
+
No subscription is necessary to email us.
|
52
|
+
Please remember to reply-to-all as we do not encourage subscription.
|
53
53
|
|
54
54
|
Copyright (C) 2013-2016 all contributors <yahns-public@yhbt.net>
|
55
|
-
License: GPL-3.0+ <
|
55
|
+
License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>
|