yahns 1.14.1 → 1.18.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.
Files changed (66) hide show
  1. checksums.yaml +5 -5
  2. data/.document +2 -0
  3. data/.gitignore +0 -1
  4. data/.olddoc.yml +3 -2
  5. data/Documentation/GNUmakefile +1 -1
  6. data/Documentation/design_notes.txt +6 -3
  7. data/Documentation/yahns-rackup.pod +7 -3
  8. data/Documentation/yahns.pod +1 -1
  9. data/Documentation/yahns_config.pod +10 -10
  10. data/GIT-VERSION-FILE +1 -1
  11. data/GIT-VERSION-GEN +3 -3
  12. data/HACKING +13 -13
  13. data/NEWS +982 -829
  14. data/README +11 -12
  15. data/Rakefile +121 -5
  16. data/examples/https_proxy_pass.conf.rb +36 -0
  17. data/examples/logrotate.conf +1 -1
  18. data/examples/proxy_pass.ru +11 -0
  19. data/extras/autoindex.rb +20 -4
  20. data/extras/exec_cgi.rb +38 -24
  21. data/extras/proxy_pass.rb +7 -6
  22. data/extras/try_gzip_static.rb +4 -1
  23. data/lib/yahns/acceptor.rb +3 -3
  24. data/lib/yahns/chunk_body.rb +2 -1
  25. data/lib/yahns/config.rb +10 -5
  26. data/lib/yahns/daemon.rb +0 -1
  27. data/lib/yahns/http_client.rb +28 -18
  28. data/lib/yahns/http_response.rb +3 -4
  29. data/lib/yahns/openssl_client.rb +33 -11
  30. data/lib/yahns/proxy_http_response.rb +3 -1
  31. data/lib/yahns/proxy_pass.rb +68 -10
  32. data/lib/yahns/queue_epoll.rb +4 -0
  33. data/lib/yahns/queue_kqueue.rb +0 -6
  34. data/lib/yahns/queue_quitter_pipe.rb +4 -1
  35. data/lib/yahns/rackup_handler.rb +3 -7
  36. data/lib/yahns/server.rb +47 -27
  37. data/lib/yahns/server_mp.rb +3 -4
  38. data/lib/yahns/sigevent_efd.rb +0 -1
  39. data/lib/yahns/sigevent_pipe.rb +13 -6
  40. data/lib/yahns/socket_helper.rb +1 -1
  41. data/lib/yahns/stream_input.rb +3 -2
  42. data/lib/yahns/tee_input.rb +1 -3
  43. data/lib/yahns/version.rb +1 -1
  44. data/lib/yahns/wbuf.rb +10 -3
  45. data/lib/yahns/worker.rb +8 -0
  46. data/lib/yahns.rb +12 -7
  47. data/man/yahns-rackup.1 +17 -17
  48. data/man/yahns.1 +11 -15
  49. data/man/yahns_config.5 +31 -31
  50. data/test/helper.rb +6 -2
  51. data/test/server_helper.rb +20 -5
  52. data/test/test_bin.rb +33 -30
  53. data/test/test_config.rb +2 -2
  54. data/test/test_extras_exec_cgi.rb +24 -1
  55. data/test/test_extras_try_gzip_static.rb +1 -1
  56. data/test/test_mt_accept.rb +0 -2
  57. data/test/test_proxy_pass.rb +1 -2
  58. data/test/test_proxy_pass_no_buffering.rb +1 -1
  59. data/test/test_rack_env.rb +58 -0
  60. data/test/test_serve_static.rb +0 -1
  61. data/test/test_server.rb +1 -4
  62. data/test/test_ssl.rb +2 -0
  63. data/test/test_unix_socket.rb +1 -3
  64. data/test/test_wbuf.rb +1 -1
  65. data/yahns.gemspec +8 -5
  66. metadata +12 -9
data/NEWS CHANGED
@@ -1,833 +1,986 @@
1
- === yahns 1.14.1 - bugfixes only / 2016-12-14 19:17 UTC
2
-
3
- This release avoids confusing HTTP/1.1 clients with a
4
- "Transfer-Encoding: chunked" header on bodyless responses.
5
- The header was causing "curl -T" to wait indefinitely for
6
- a response body after the server sent a 204.
7
- This regression was introduced with autochunk introduced
8
- with yahns 1.13(*).
9
-
10
- rack.hijack was also broken for ancient "HTTP/0.9" requests,
11
- and now fixed.
12
-
13
- 4 changes since 1.14.0:
14
-
15
- queue_*: fix outdated comments
16
- http_response: support rack.hijack on HTTP/0.9 responses
17
- response: do not set chunked header on bodyless responses
18
- proxy_pass: do not chunk on bodyless upstream responses
19
-
20
- (*) https://yhbt.net/yahns-public/20160805-yahns-1.13.0-released@lucky13/
21
-
22
- === yahns 1.14.0 - removing undefined behavior / 2016-11-14 21:16 UTC
23
-
24
- There's minor feature removals for undocumented and
25
- undefined features and behavior which are unlikely to
26
- affect anybody unless they serve HTTPS.
27
-
28
- Our website is now self-hosted with HTTPS support (HTTP remains
29
- supported for legacy systems):
30
-
31
- https://yhbt.net/yahns/README
32
-
33
- See git history at git://yhbt.net/yahns.git for full details.
34
-
35
- openssl_client: avoid undefined SSL_write behavior
36
- move website to https://yhbt.net/yahns/
37
- stream_file: remove #to_io support from responses
38
- response: only stream "file" responses on known length
39
- response: fixup compile error
40
- req_res: do not send 502 on catchall error if response buffered
41
-
42
- === yahns 1.13.0 - some user-visible improvements... / 2016-08-05 07:26 UTC
43
-
44
- And probably a billion new regressions!
45
-
46
- yahns now allows users to skip the Rack::Head, Rack::Chunked and
47
- Rack::ContentLength middlewares to ease migrating from/to other
48
- real-world Rack HTTP servers. Most notably, our chunked
49
- encoding implementation is a bit faster than Rack::Chunked by
50
- taking advantage of the writev(2) syscall:
51
-
52
- https://yhbt.net/yahns-public/20160803031906.14553-4-e@80x24.org/
53
-
54
- There's also rack 2.x fixes in the test case and extras/ section
55
- (these incompatibilities did not affect existing users unless
56
- they use the wonky extras/ section).
57
-
58
- There's also some graceful shutdown fixes, the process title is
59
- now changed to display the number of live FDs.
60
-
61
- Of course, there's the usual round of documentation improvements
62
- which are systemd and OpenSSL setup-related this time around.
63
-
64
- However, the majority of changes (proxy_*, wbuf_lite), affect
65
- currently-unadvertised functionality which is subject to removal
66
- or incompatible config changes. However, they are used to serve
67
- our mailing list archives at:
68
-
69
- https://yhbt.net/yahns-public/
70
-
71
- 49 changes since yahns 1.12.5:
72
- proxy_pass: simplify writing request bodies upstream
73
- proxy_pass: hoist out proxy_res_headers method
74
- proxy_pass: simplify proxy_http_response
75
- proxy_pass: split out body and trailer reading in response
76
- proxy_pass: trim down proxy_response_finish, too
77
- proxy_pass: split out req_res into a separate file
78
- proxy_pass: fix resumes after complete buffering is unblocked
79
- proxy_pass: X-Forwarded-For appends to existing list
80
- proxy_pass: pass entire object to proxy_http_response
81
- proxy_pass: support "proxy_buffering: false"
82
- proxy_pass: remove unnecessary rescue
83
- req_res: store proxy_pass object here, instead
84
- proxy_pass: redo "proxy_buffering: false"
85
- wbuf: remove needless "busy" parameter
86
- Merge branch 'maint'
87
- extras/try_gzip_static: do not show backtrace on syscall errors
88
- wbuf: remove tmpdir parameter
89
- wbuf_lite: fix write retries for OpenSSL sockets
90
- test_proxy_pass_no_buffering: fix racy test
91
- queue_*: check for closed IO objects
92
- cleanup graceful shutdown handling
93
- proxy_pass: more descriptive error messages
94
- proxy_pass: fix HTTP/1.0 backends on EOF w/o buffering
95
- wbuf_common: reset offset counter when done
96
- extras/try_gzip_static: resolve symlinks
97
- test_ssl: remove unnecessary priv_key DH parameter
98
- openssl_client: wrap shutdown for graceful termination
99
- proxy_pass: keep trailer buffer on blocked client writes
100
- proxy_pass: avoid TOCTTOU race when unbuffering, too
101
- proxy_pass: avoid accessing logger in env after hijacking
102
- proxy_pass: avoid stuck responses in "proxy_buffering: false"
103
- extras: include status messages in responses
104
- update init and add systemd examples
105
- test_proxy_pass_no_buffering: exclude rb/ru files, too
106
- wbuf_lite: use StringIO instead of TmpIO
107
- wbuf_lite: truncate StringIO when done
108
- wbuf_lite: prevent clobbering responses
109
- wbuf_lite: unify EOF error handling
110
- wbuf_lite: reset sf_offset/sf_count consistently
111
- wbuf_lite: clear @busy flag when re-arming
112
- http_response: drop bodies for non-compliant responses
113
- fix rack 2.x compatibility bugs
114
- doc: add session cache usage to OpenSSL example
115
- test: skip some buffering tests on non-default values
116
- response: drop clients after HTTP responses of unknown length
117
- response: reduce stack overhead for parameter passing
118
- response: support auto-chunking for HTTP/1.1
119
- Revert "document Rack::Chunked/ContentLength semi-requirements"
120
- extras/exec_cgi: fix for HTTPoxy vulnerability
121
-
122
- === yahns 1.12.5 - proxy_pass + rack.hijack fixes / 2016-06-05 23:09 UTC
123
-
124
- Hopefully the last of the 1.12.x series, this release
125
- fixes a few minor bugs mainly needed for testing.
126
-
127
- No upgrade should be necessary for non-proxy_pass users.
128
-
129
- 4 changes since v1.12.4 from the "maint" branch at
130
- git://yhbt.net/yahns.git
131
-
132
- http_client: set state to :ignore before hijack callback
133
- test/test_client_expire: fix for high RLIMIT_NOFILE
134
- proxy_pass: do not chunk HTTP/1.0 with keep-alive
135
- proxy_pass: X-Forwarded-For appends to existing list
136
-
137
- lib/yahns/http_client.rb | 6 +++---
138
- lib/yahns/proxy_http_response.rb | 8 ++++++--
139
- lib/yahns/proxy_pass.rb | 5 ++++-
140
- test/test_client_expire.rb | 13 +++++++++++--
141
- test/test_proxy_pass.rb | 10 ++++++++++
142
- 5 files changed, 34 insertions(+), 8 deletions(-)
143
-
144
- Note: the current "master" branch (at commit 5e211ea003d2)
145
- includes refactorings and new features not included in this
146
- release.
147
-
148
- === yahns 1.12.4 - rack.hijack and proxy_pass bugfixes / 2016-05-02 19:43 UTC
149
-
150
- This release fixes some resource leaks in uncommonly used parts
151
- of yahns as well as including some documentation improvements.
152
- No need to upgrade unless you rely on rack.hijack for responses
153
- or use the (currently-undocumented) proxy_pass module(*).
154
-
155
- 9 non-merge changes since 1.12.3:
156
-
157
- proxy_pass: honor wbuf_persist when ending response
158
- proxy_http_response: fix non-terminated fast responses, too
159
- test_proxy_pass: test for auto chunking on 1.0 backends
160
- wbuf: drop persistence if writing to client fails
161
- proxy_http_response: cleanup: avoid redundant setting of "alive"
162
- proxy_http_response: do not persist upstream on slow clients
163
- proxy_pass: drop resources immediately on errors
164
- document Rack::Chunked/ContentLength semi-requirements
165
- extras/exec_cgi: document cgit example
166
-
167
- Documentation/yahns-rackup.pod | 10 ++++++++++
168
- GIT-VERSION-GEN | 2 +-
169
- examples/yahns_rack_basic.conf.rb | 6 ++++++
170
- extras/exec_cgi.rb | 8 ++++++++
171
- lib/yahns/proxy_http_response.rb | 40 ++++++++++++++++++++++-----------------
172
- lib/yahns/proxy_pass.rb | 5 +++--
173
- lib/yahns/wbuf_common.rb | 1 +
174
- test/test_proxy_pass.rb | 15 +++++++++++++++
175
- 8 files changed, 67 insertions(+), 20 deletions(-)
176
-
177
- (*) 1.13.0 will include refactoring in proxy_pass and possibly
178
- documenting it as stable-enough-for-public use:
179
-
180
- https://yhbt.net/yahns-public/20160220081619.GA10850@dcvr.yhbt.net/t/
181
-
182
- === yahns 1.12.3 - more fixes and doc updates / 2016-04-08 19:48 UTC
183
-
184
- This release only contains two changes since v1.12.2:
185
-
186
- * proxy_http_response: workaround non-terminated backends
187
-
188
- The first is a fix for the undocumented and unstable "proxy_pass"
189
- feature:
190
- https://yhbt.net/yahns-public/20160406062556.10988-1-e@80x24.org/t/
191
-
192
- However, I'm considering supporting proxy_pass as a stable API:
1
+ yahns 1.18.0 / 2021-10-09
2
+ -------------------------
3
+
4
+ 8 changes since 1.17.0 (2019-04-22):
5
+
6
+ worker: workaround old F_SETPIPE_SZ bug
7
+ doc: favor File.read over IO.read to ease review
8
+ proxy_pass: document as a public API
9
+ doc: include Yahns/ directory on website
10
+ extras/try_gzip_static: set "Vary: Accept-Encoding" on gzip
11
+ do not sleep if signals are pending
12
+ server: workaround Linux v5.5..v5.13 epoll bug
13
+ gemspec: allow unicorn 6.x
14
+
15
+ yahns 1.17.0 - Earth Day release / 2019-04-22
16
+ ---------------------------------------------
17
+
18
+ This releases includes a few kqueue-related bugfixes from
19
+ Lin Jen-Shin <godfat@godfat.org>. There's also some
20
+ shutdown_timeout-related bugfixes and some cleanups to
21
+ reduce dependencies on kgio.
22
+
23
+ extras/exec_cgi and extras/autoindex both got some minor
24
+ updates; the latter of which defaults to a dark scheme to save
25
+ power on OLED and CRT displays (it is Earth Day, after all :>)
26
+
27
+ Eric Wong (25):
28
+ doc: fix git URLs in README and HACKING
29
+ http_client: do not warn on do_pread overreach
30
+ remove IO#close_on_exec= calls
31
+ yahns/worker: shrink pipe under Linux
32
+ test/test_extras_exec_cgi.rb: improve test reliability
33
+ extras/exec_cgi: remove kgio dependency
34
+ extras/exec_cgi: update copyright year and use SPDX
35
+ extras/exec_cgi: @body_tip is always set
36
+ extras/exec_cgi: support Process.spawn options (e.g. RLIMIT_*)
37
+ server_mp: favor "Kernel#select" instead of "IO.select"
38
+ server_mp: remove redundant srand call
39
+ extras/exec_cgi: remove unecessary .freeze calls
40
+ server: respect shutdown_timeout
41
+ server: extra shutdown timeout debugging
42
+ wbuf: use IO#write directly in Ruby 2.5+ for writev
43
+ worker: rely on F_SETPIPE_SZ to set mininum value
44
+ remove calls to kgio_wait_* able
45
+ do not shutdown until listeners are all stopped
46
+ README: remove SMTP-based subscription info
47
+ sigevent_*: fixup non-eventfd path
48
+ README: note HTTPS support for HTTP/1.1
49
+ extras/autoindex: use dark colors by default
50
+ doc: update homepage to point to cgit install
51
+ doc: update wording to avoid "mailing list"
52
+ doc: remove inaccurate comment about "GNU-ism"
53
+
54
+ Lin Jen-Shin (2):
55
+ Add QueueQuitter#closed? to queue_quitter_pipe.rb
56
+ @srv.shutdown could raise Errno::ENOTCONN
57
+
58
+ yahns 1.16.0 / 2018-08-06
59
+ -------------------------
60
+
61
+ This release fixes warnings for users combining Rack::Deflater
62
+ with HTTPS support:
63
+ https://yhbt.net/yahns-public/20180714005630.11812-1-e@80x24.org/
64
+
65
+ yahns-rackup(1) users may not specify "-O listen=inherit"
66
+ when spawning from systemd. The "listen" directive may
67
+ be omitted entirely from the yahns-config(5) files.
68
+
69
+ A few other cleanups and nothing interesting, otherwise.
70
+
71
+ 20 yawn-worthy changes since v1.15.0 (2017-03-23):
72
+ config: more descriptive variable name
73
+ proxy_pass: comment explaining what rack.hijack calls
74
+ USR2 upgrades may use Process.spawn for vfork
75
+ avoid Thread#[] and Thread#[]= across threads
76
+ gemspec: declare Ruby 2.0+ dependency, here
77
+ test_bin: SO_KEEPALIVE value only needs to be true
78
+ rackup_handler: remove unnecessary branch
79
+ test_bin: use RbConfig.ruby for non-standard names
80
+ allow omitting specifying socket name when inheriting listen socket
81
+ server: fix incomplete comment about SSLContext#setup
82
+ test_rack_env: additional test for Rack environment
83
+ test: allow setting TAIL env to watch error logs
84
+ fix some unused variables
85
+ tests: thread-safety fixes
86
+ test/server_helper: describe reason for termination
87
+ test/test_ssl: set SSLContext#security_level=0
88
+ doc: https:// URLs instead of git://
89
+ http_client: clear backtrace on "wrong version number" in OpenSSL
90
+ openssl_client: do not attempt writes after SystemCallError
91
+ use IO#pread if available in Ruby 2.5
92
+
93
+ *ZZZZZZ*
94
+
95
+ yahns 1.15.0 / 2017-03-23
96
+ -------------------------
97
+
98
+ Minor changes to reduce allocations and simplify our code
99
+ and dependencies. Nothing particularly interesting unless
100
+ you're the type of person who appreciates brake pedals
101
+ in with holes drilled in them for weight reduction.
102
+
103
+ 11 changes since 1.14.1 (2016-12-14):
104
+ stream_input: avoid allocation for common #read case
105
+ proxy_pass: add a note about the instability of this
106
+ tee_input: simplify conditional for writing to temporary file
107
+ proxy_http_response: reduce memory pressure from larger headers
108
+ http_response: make response headers eligible for GC, sooner
109
+ update more referenced URLs to be HTTPS
110
+ chunk_body: nodoc this internal class
111
+ Revert "use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml"
112
+ gemspec: stop advertising "private" email address
113
+ doc: design_notes: we do not use EPOLLEXCLUSIVE
114
+ README: update with disclaimer about subscription
115
+
116
+ Ovt punatrf pbzvat...
117
+
118
+ yahns 1.14.1 - bugfixes only / 2016-12-14
119
+ -----------------------------------------
120
+
121
+ This release avoids confusing HTTP/1.1 clients with a
122
+ "Transfer-Encoding: chunked" header on bodyless responses.
123
+ The header was causing "curl -T" to wait indefinitely for
124
+ a response body after the server sent a 204.
125
+ This regression was introduced with autochunk introduced
126
+ with yahns 1.13(*).
127
+
128
+ rack.hijack was also broken for ancient "HTTP/0.9" requests,
129
+ and now fixed.
130
+
131
+ 4 changes since 1.14.0:
132
+
133
+ queue_*: fix outdated comments
134
+ http_response: support rack.hijack on HTTP/0.9 responses
135
+ response: do not set chunked header on bodyless responses
136
+ proxy_pass: do not chunk on bodyless upstream responses
137
+
138
+ (*) https://yhbt.net/yahns-public/20160805-yahns-1.13.0-released@lucky13/
139
+
140
+ yahns 1.14.0 - removing undefined behavior / 2016-11-14
141
+ -------------------------------------------------------
142
+
143
+ There's minor feature removals for undocumented and
144
+ undefined features and behavior which are unlikely to
145
+ affect anybody unless they serve HTTPS.
146
+
147
+ Our website is now self-hosted with HTTPS support (HTTP remains
148
+ supported for legacy systems):
149
+
150
+ https://yhbt.net/yahns/README
151
+
152
+ See git history at git://yhbt.net/yahns.git for full details.
153
+
154
+ openssl_client: avoid undefined SSL_write behavior
155
+ move website to https://yhbt.net/yahns/
156
+ stream_file: remove #to_io support from responses
157
+ response: only stream "file" responses on known length
158
+ response: fixup compile error
159
+ req_res: do not send 502 on catchall error if response buffered
160
+
161
+ yahns 1.13.0 - some user-visible improvements... / 2016-08-05
162
+ -------------------------------------------------------------
163
+
164
+ And probably a billion new regressions!
165
+
166
+ yahns now allows users to skip the Rack::Head, Rack::Chunked and
167
+ Rack::ContentLength middlewares to ease migrating from/to other
168
+ real-world Rack HTTP servers. Most notably, our chunked
169
+ encoding implementation is a bit faster than Rack::Chunked by
170
+ taking advantage of the writev(2) syscall:
171
+
172
+ https://yhbt.net/yahns-public/20160803031906.14553-4-e@80x24.org/
173
+
174
+ There's also rack 2.x fixes in the test case and extras/ section
175
+ (these incompatibilities did not affect existing users unless
176
+ they use the wonky extras/ section).
177
+
178
+ There's also some graceful shutdown fixes, the process title is
179
+ now changed to display the number of live FDs.
180
+
181
+ Of course, there's the usual round of documentation improvements
182
+ which are systemd and OpenSSL setup-related this time around.
183
+
184
+ However, the majority of changes (proxy_*, wbuf_lite), affect
185
+ currently-unadvertised functionality which is subject to removal
186
+ or incompatible config changes. However, they are used to serve
187
+ our mailing list archives at:
188
+
189
+ https://yhbt.net/yahns-public/
190
+
191
+ 49 changes since yahns 1.12.5:
192
+ proxy_pass: simplify writing request bodies upstream
193
+ proxy_pass: hoist out proxy_res_headers method
194
+ proxy_pass: simplify proxy_http_response
195
+ proxy_pass: split out body and trailer reading in response
196
+ proxy_pass: trim down proxy_response_finish, too
197
+ proxy_pass: split out req_res into a separate file
198
+ proxy_pass: fix resumes after complete buffering is unblocked
199
+ proxy_pass: X-Forwarded-For appends to existing list
200
+ proxy_pass: pass entire object to proxy_http_response
201
+ proxy_pass: support "proxy_buffering: false"
202
+ proxy_pass: remove unnecessary rescue
203
+ req_res: store proxy_pass object here, instead
204
+ proxy_pass: redo "proxy_buffering: false"
205
+ wbuf: remove needless "busy" parameter
206
+ Merge branch 'maint'
207
+ extras/try_gzip_static: do not show backtrace on syscall errors
208
+ wbuf: remove tmpdir parameter
209
+ wbuf_lite: fix write retries for OpenSSL sockets
210
+ test_proxy_pass_no_buffering: fix racy test
211
+ queue_*: check for closed IO objects
212
+ cleanup graceful shutdown handling
213
+ proxy_pass: more descriptive error messages
214
+ proxy_pass: fix HTTP/1.0 backends on EOF w/o buffering
215
+ wbuf_common: reset offset counter when done
216
+ extras/try_gzip_static: resolve symlinks
217
+ test_ssl: remove unnecessary priv_key DH parameter
218
+ openssl_client: wrap shutdown for graceful termination
219
+ proxy_pass: keep trailer buffer on blocked client writes
220
+ proxy_pass: avoid TOCTTOU race when unbuffering, too
221
+ proxy_pass: avoid accessing logger in env after hijacking
222
+ proxy_pass: avoid stuck responses in "proxy_buffering: false"
223
+ extras: include status messages in responses
224
+ update init and add systemd examples
225
+ test_proxy_pass_no_buffering: exclude rb/ru files, too
226
+ wbuf_lite: use StringIO instead of TmpIO
227
+ wbuf_lite: truncate StringIO when done
228
+ wbuf_lite: prevent clobbering responses
229
+ wbuf_lite: unify EOF error handling
230
+ wbuf_lite: reset sf_offset/sf_count consistently
231
+ wbuf_lite: clear @busy flag when re-arming
232
+ http_response: drop bodies for non-compliant responses
233
+ fix rack 2.x compatibility bugs
234
+ doc: add session cache usage to OpenSSL example
235
+ test: skip some buffering tests on non-default values
236
+ response: drop clients after HTTP responses of unknown length
237
+ response: reduce stack overhead for parameter passing
238
+ response: support auto-chunking for HTTP/1.1
239
+ Revert "document Rack::Chunked/ContentLength semi-requirements"
240
+ extras/exec_cgi: fix for HTTPoxy vulnerability
241
+
242
+ yahns 1.12.5 - proxy_pass + rack.hijack fixes / 2016-06-05
243
+ ----------------------------------------------------------
244
+
245
+ Hopefully the last of the 1.12.x series, this release
246
+ fixes a few minor bugs mainly needed for testing.
247
+
248
+ No upgrade should be necessary for non-proxy_pass users.
249
+
250
+ 4 changes since v1.12.4 from the "maint" branch at
251
+ git://yhbt.net/yahns.git
252
+
253
+ http_client: set state to :ignore before hijack callback
254
+ test/test_client_expire: fix for high RLIMIT_NOFILE
255
+ proxy_pass: do not chunk HTTP/1.0 with keep-alive
256
+ proxy_pass: X-Forwarded-For appends to existing list
257
+
258
+ lib/yahns/http_client.rb | 6 +++---
259
+ lib/yahns/proxy_http_response.rb | 8 ++++++--
260
+ lib/yahns/proxy_pass.rb | 5 ++++-
261
+ test/test_client_expire.rb | 13 +++++++++++--
262
+ test/test_proxy_pass.rb | 10 ++++++++++
263
+ 5 files changed, 34 insertions(+), 8 deletions(-)
264
+
265
+ Note: the current "master" branch (at commit 5e211ea003d2)
266
+ includes refactorings and new features not included in this
267
+ release.
268
+
269
+ yahns 1.12.4 - rack.hijack and proxy_pass bugfixes / 2016-05-02
270
+ ---------------------------------------------------------------
271
+
272
+ This release fixes some resource leaks in uncommonly used parts
273
+ of yahns as well as including some documentation improvements.
274
+ No need to upgrade unless you rely on rack.hijack for responses
275
+ or use the (currently-undocumented) proxy_pass module(*).
276
+
277
+ 9 non-merge changes since 1.12.3:
278
+
279
+ proxy_pass: honor wbuf_persist when ending response
280
+ proxy_http_response: fix non-terminated fast responses, too
281
+ test_proxy_pass: test for auto chunking on 1.0 backends
282
+ wbuf: drop persistence if writing to client fails
283
+ proxy_http_response: cleanup: avoid redundant setting of "alive"
284
+ proxy_http_response: do not persist upstream on slow clients
285
+ proxy_pass: drop resources immediately on errors
286
+ document Rack::Chunked/ContentLength semi-requirements
287
+ extras/exec_cgi: document cgit example
288
+
289
+ Documentation/yahns-rackup.pod | 10 ++++++++++
290
+ GIT-VERSION-GEN | 2 +-
291
+ examples/yahns_rack_basic.conf.rb | 6 ++++++
292
+ extras/exec_cgi.rb | 8 ++++++++
293
+ lib/yahns/proxy_http_response.rb | 40 ++++++++++++++++++++++-----------------
294
+ lib/yahns/proxy_pass.rb | 5 +++--
295
+ lib/yahns/wbuf_common.rb | 1 +
296
+ test/test_proxy_pass.rb | 15 +++++++++++++++
297
+ 8 files changed, 67 insertions(+), 20 deletions(-)
298
+
299
+ (*) 1.13.0 will include refactoring in proxy_pass and possibly
300
+ documenting it as stable-enough-for-public use:
301
+
193
302
  https://yhbt.net/yahns-public/20160220081619.GA10850@dcvr.yhbt.net/t/
194
303
 
195
- * doc: recommend "verify_mode: OpenSSL::SSL::VERIFY_NONE"
304
+ yahns 1.12.3 - more fixes and doc updates / 2016-04-08
305
+ ------------------------------------------------------
306
+
307
+ This release only contains two changes since v1.12.2:
308
+
309
+ * proxy_http_response: workaround non-terminated backends
310
+
311
+ The first is a fix for the undocumented and unstable "proxy_pass"
312
+ feature:
313
+ https://yhbt.net/yahns-public/20160406062556.10988-1-e@80x24.org/t/
314
+
315
+ However, I'm considering supporting proxy_pass as a stable API:
316
+ https://yhbt.net/yahns-public/20160220081619.GA10850@dcvr.yhbt.net/t/
317
+
318
+ * doc: recommend "verify_mode: OpenSSL::SSL::VERIFY_NONE"
319
+
320
+ Only a documentation change prompted by the discovery that
321
+ some browsers/platforms will try to prompt users for client
322
+ certs:
323
+ https://yhbt.net/yahns-public/20160316003434.GA14791@dcvr.yhbt.net/t/
196
324
 
197
- Only a documentation change prompted by the discovery that
198
- some browsers/platforms will try to prompt users for client
199
- certs:
200
- https://yhbt.net/yahns-public/20160316003434.GA14791@dcvr.yhbt.net/t/
201
-
202
- === yahns 1.12.2 - minor doc and TLS fixes / 2016-03-01 01:55 UTC
203
-
204
- This release ensures OpenSSL::SSL::SSLContext#session_id_context
205
- is always set for OpenSSL users. It won't overwrite existing
206
- settings, but setting it to a random value is necessary to
207
- ensure clients do not get aborted connections when attempting to
208
- use a session cache.
209
-
210
- No need to actually upgrade if you're on 1.12.1, you may add the
211
- following to your yahns_config(5) file where
212
- OpenSSL::SSL::SSLContext is configured:
213
-
214
- # recommended, not required. This sets safer defaults
215
- # provided by Ruby on top of what OpenSSL gives:
216
- ssl_ctx.set_params
217
-
218
- # required, and done by default in v1.12.2:
219
- ssl_ctx.session_id_context ||= OpenSSL::Random.random_bytes(32)
220
-
221
- yahns gives you full control of of how OpenSSL::SSL::SSLContext is
222
- configured. To avoid bugs, yahns only ensures
223
- OpenSSL::SSL::SSLContext#session_id_context is set (if not previously
224
- set by the user) and calls OpenSSL::SSL::SSLContext#setup before
225
- spawning threads to avoid race conditions. yahns itself does not and
226
- will not enforce any opinion on the compatibility/performance/security
227
- trade-offs regarding TLS configuration.
228
-
229
- Note: keep in mind using an SSL session cache may be less useful
230
- with yahns because HTTP/1.1 persistent connections may live
231
- forever :)
232
-
233
- 3 bug/doc fixes on top of v1.12.1:
234
- document OpenSSL::SSL::SSLContext#set_params use
235
- ssl: ensure is session_id_context is always set
236
- test/*: fix mktmpdir usage for 1.9.3
237
-
238
- === yahns 1.12.1 - more TLS fixes / 2016-02-22 00:39 UTC
239
-
240
- Most notably release fixes TLS output buffering for large
241
- responses to slow clients. For Rack HTTPS users,
242
- env['SERVER_PORT'] also defaults to 443 properly unless the
243
- Host: request header specifies differently.
244
-
245
- Also, the extras/autoindex change is to make our own directory
246
- listing look nicer as we use Let's Encrypt and don't want to
247
- waste space listing ".well-known/" directory contents on:
248
-
249
- https://yahns.yhbt.net/
250
-
251
- Yes, we really do care how our homepage looks!
252
-
253
- 6 changes since v1.12.1:
254
- extras/autoindex: support hiding dotfiles
255
- fix output buffering with SSL_write
256
- https: ensure SERVER_PORT defaults to 443
257
- test_ssl: check SERVER_PORT when parsed from Host: header
258
- doc: mention kqueue/kevent alongside epoll
259
- doc: more minor updates
260
-
261
- === yahns 1.12.0 - TLS fixes and more! / 2016-02-14 22:30 UTC
262
-
263
- Most notably, serving static files over HTTPS did not work
264
- before this release with the "sendfile" gem installed. The
265
- yahns_config(5) manpage is also updated with an example for
266
- using OpenSSL::SSL::SSLContext objects. Users of
267
- Rack::Request#scheme and env['rack.url_scheme'] should see
268
- "https" properly set for HTTPS connections.
269
-
270
- There's also a bunch of internal tweaks like taking advantage of
271
- the file-level frozen_string_literal: directive in 2.3 and
272
- explicitly clearing short-lived string buffers
273
-
274
- TLS support is still in its early stages, but I'm experimenting
275
- with Let's Encrypt (via getssl[1]) and hosting https://YHBT.net/
276
- on it.
277
-
278
- For now, I suggest using a separate yahns instance (with a
279
- different master process) to avoid any potential data leaks
280
- between HTTPS and HTTP instances. In the future, it may be
281
- possible to isolate HTTPS from HTTP at the worker process level.
282
- Supporting GnuTLS (alongside OpenSSL) may be in our future, too.
283
-
284
- To paraphrase the warning in http://www.postfix.org/TLS_README.html
285
- (which was written before Heartbleed):
286
-
287
- WARNING
288
-
289
- By turning on TLS support in yahns, you not only get the
290
- ability to encrypt traffic and to authenticate remote
291
- clients. You also turn on thousands and thousands of
292
- lines of OpenSSL library code. Assuming that OpenSSL is
293
- written as carefully as Eric's own code, every 1000 lines
294
- introduce one additional bug into yahns.
295
-
296
- I'm not nearly as careful with yahns as Wietse is with postfix,
297
- either.
298
-
299
- 20 changes since v1.11.0:
300
- README: updates for kqueue
301
- add .gitattributes for Ruby method detection
302
- nodoc internals
303
- enable frozen_string_literal for Ruby 2.3+
304
- copyright updates for 2016
305
- extras/exec_cgi: fix frozen string error on slow responses
306
- avoid StringIO#binmode for the next few years
307
- use String#clear for short-lived buffers we create
308
- gemspec: make rack a development dependency
309
- build: install-gem forced to "--local" domain
310
- acceptor: all subclasses of TCPServer use TCP_INFO
311
- properly emulate sendfile for OpenSSL sockets
312
- avoid race conditions in OpenSSL::SSL::SSLContext#setup
313
- set HTTPS and rack.url_scheme in Rack env as appropriate
314
- proxy_pass: pass X-Forwarded-Proto through
315
- doc: switch to perlpod (from pandoc-flavored Markdown)
316
- doc: trim down documentation slightly
317
- doc: document ssl_ctx for "listen" directive
318
- doc: various doc and linkification improvements
319
- http_context: reduce constant lookup + bytecode
320
-
321
- [1] git clone https://github.com/srvrco/getssl.git
322
-
323
- === yahns 1.11.0 - more minor updates / 2015-12-13 02:20 UTC
324
-
325
- There's some minor test case fixes and documentation updates.
326
-
327
- For OpenSSL users running the Ruby 2.3.0 preview releases,
328
- we now use `exception: false' for for accept_nonblock to reduce
329
- exceptions. Non-SSL I/O still uses kgio for now.
330
-
331
- 6 changes since 1.10.0:
332
- wbuf: fix typo in bug check for sendfile gem
333
- test_wbuf: deal with proper zero-copy for Unix sockets
334
- README: clarify and update copyright year
335
- doc: document and reference sd_listen_fds(3) behavior
336
- test_server: fix race condition in hooks test
337
- openssl_client: use `exception: false' for accept_nonblock
338
-
339
- === yahns 1.10.0 - minor updates / 2015-11-01 09:08 UTC
340
-
341
- * test_client_expire: favor Process.spawn over fork+exec
342
- * extras/try_gzip_static: require readability on HEAD requests
343
- * proxy_pass: quiet down ECONNRESET and EPIPE, too
344
- * copyright updates
345
- * update various comments
346
- * proxy_http_response: use frozen string literal optimization
347
- * README: add link to NNTP archive endpoint
348
- * use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml
349
- * gemspec fixes for various RubyGems versions
350
- * bytecode golfing to cut a few bytes of memory
351
- * simplify sd_listen_fds emulation
352
- * gemspec: allow compatibility with unicorn 5
353
-
354
- === yahns 1.9.0 - minor updates / 2015-07-21 20:29 UTC
355
-
356
- This release improves socket inheritance support. TCP socket
357
- options are now applied to inherited sockets. We also emulate
358
- the sd_listen_fds function to allow inheriting sockets from
359
- systemd.
360
-
361
- HTTP status strings are now generated dynamically, allowing
362
- applications to modify Rack::Utils::HTTP_STATUS_CODES to
363
- apply changes in the Rack response. Unfortunately, this leads
364
- to minor (likely unnoticeable) performance regressions.
365
-
366
- However, our code is not optimized for Ruby 2.2+, so users on
367
- the latest released Ruby will benefit from reduced inline cache
368
- and constant lookups as we reduced our constant footprint.
369
- Expect further minor performance regressions if you are running
370
- Ruby 2.2 and earlier.
371
-
372
- For Ruby 2.2 users, overall performance should be largely
373
- unchanged from 1.7.0 to 1.8.0
374
-
375
- shortlog of changes since 1.7.0:
376
-
377
- * use opt_str_freeze for Hash#delete
378
- * test/helper: warn atomically
379
- * generate response status strings dynamically
380
- * reduce constants and optimize for Ruby 2.2+
381
- * http_response: reduce bytecode size
382
- * apply TCP socket options on inherited sockets
383
- * test/test_rack_hijack.rb: try to increase test reliability
384
- * emulate sd_listen_fds for systemd support
385
- * test/test_rack_hijack: ensure proper ordering of log messages
386
-
387
- === yahns 1.8.0 - minor updates / 2015-06-11 19:54 UTC
388
-
389
- Most notably, the Rack response body is now closed during rack.hijack.
390
-
391
- Middlewares such as Rack::Lock (used by Rails) break badly unless
392
- the response body is closed on hijack, so we will close it to follow
393
- the lead of other popular Rack servers.
394
-
395
- While it's unclear if there's anybody using rack.hijack besides
396
- yahns/proxy_pass we'll try to emulate the behavior of other servers
397
- as much as possible.
398
-
399
- ref: https://github.com/ngauthier/tubesock/issues/10
400
-
401
- We'll also support SIGWINCH if not daemonized
402
-
403
- This has no effect for the (default) single process case with
404
- no master/worker relationship as that does not support SIGWINCH.
405
-
406
- Some process managers such as foreman and daemontools rely on
407
- yahnsnot daemonizing, but we still want to be able to process
408
- SIGWINCH in that case.
409
-
410
- stdout and stderr may be redirected to a pipe (for cronolog or
411
- similar process), so those are less likely to be attached to a TTY
412
- than stdin. This also allows users to process SIGWINCH when running
413
- inside a regular terminal if they redirect stdin to /dev/null.
414
-
415
- This follows unicorn commit a6077391bb62d0b13016084b0eea36b987afe8f0
416
- Thanks to Dan Moore for suggesting it on the unicorn list.
417
-
418
- A few more minor changes, more memory reduction changes coming...
419
-
420
- * proxy_pass: no point in closing StringIO
421
- * proxy_pass: allow filtering or overriding response headers
422
- * support SIGWINCH even if not daemonized
423
- * use Unicorn::HttpParser#response_start_sent accessor
424
- * reduce inline constant cache overheads
425
- * proxy_pass: skip tests if kcar is missing
426
- * ensure body is closed during hijack
427
-
428
- === yahns 1.7.0 - rack.hijack improvements and more / 2015-05-11 01:38 UTC
429
-
430
- Nothing really significant, so there's no need to upgrade if
431
- you're not affected by the minor fixes and changes in this
432
- release.
433
-
434
- For all users, LoadError and SyntaxError exceptions are now
435
- logged and non-fatal within worker threads serving application
436
- code. Thanks to Lin Jen-Shin <godfat@godfat.org> for bringing
437
- this up on the mailing list.
438
-
439
- Additionally, temporary files buffered to the filesystem will
440
- now support the Rack::TempfileReaper middleware in rack 1.6+
441
-
442
- For rack.hijack users, there are some changes and improvements.
443
- rack.hijack should return a usable IO-like object for SSL users,
444
- now. The rack.input object is no longer closed on hijacking,
445
- allowing apps to continue using buffered input after hijacking.
446
- There is also a bugfix for the rare apps which hijack requests
447
- after emitting 100-continue responses.
448
-
449
- Note: there is also a work-in-progress and under-documented
450
- asynchronous Yayns::ProxyPass Rack app which uses rack.hijack
451
- internally. This will allow yahns to act as a fully-buffering
452
- reverse proxy to upstream servers which cannot handle slow
453
- clients. Yahns::ProxyPass NOT production-ready as of this
454
- release. The old, synchronous extras/proxy_pass.rb code
455
- remains usable.
456
-
457
- There's also the usual round of minor code bloat reduction.
458
-
459
- === yahns 1.6.0 - reduced allocations and bugfixes / 2015-03-09 09:33 UTC
460
-
461
- This release fixes a bug where previously-configured-but-now-removed
462
- listeners were inherited across USR2 upgrades are not shutdown
463
- immediately in the child.
464
-
465
- There are also minor reductions in allocations which can save a few
466
- hundred bytes statically and also whenever write buffering is necessary
467
- for large responses.
468
-
469
- Some minor documentation updates improvements in extras, too.
470
-
471
- shortlog of changes since 1.5.0:
472
- README: add link to mailing list archives
473
- test_ssl: factor out server SSLContext creation
474
- doc: add design_notes document
475
- reduce File::Stat object allocations
476
- update comments about wbuf_close return values
477
- wbuf: lazily (re)create temporary file
478
- fix compatibility with unicorn.git
479
- skip tests requiring String#b on 1.9.3
480
- use the monotonic clock under Ruby 2.1+
481
- favor Class.new for method-less classes
482
- extras/proxy_pass: save memory in String#split arg
483
- extras/proxy_pass: do not name unused variable
484
- extras/proxy_pass: log exceptions leading to 502
485
- extras/proxy_pass: flesh out upload support + tests
486
- acceptor: close inherited-but-unneeded sockets
487
-
488
- See the git repository for more: git clone git://yhbt.net/yahns
489
-
490
- === yahns 1.5.0 - initial OpenSSL support and bugfixes / 2014-12-21 02:22 UTC
491
-
492
- This release adds basic OpenSSL support for HTTPS connections.
493
-
494
- Users must supply a OpenSSL::SSL::SSLContext object which yahns will use
495
- as-is. yahns will only support HTTPS on Ruby 2.1 and later, as we rely
496
- on "exception: false" in the read_nonblock and write_nonblock methods in
497
- OpenSSL::SSL::SSLSocket.
498
-
499
- See the Ruby standard library documentation on how to configure
500
- OpenSSL::SSL::SSLContext objects to pass to the yahns "listen" directive
501
- Editing the yahns config file to use OpenSSL goes something like this:
502
-
503
- require 'openssl' # we will not do this for the user, even
504
- ctx = OpenSSL::SSL::SSLContext.new
505
- # user must configure ctx here...
506
-
507
- listen 443, ssl_ctx: ctx
508
-
509
- Note: yahns developers are not responsible for bugs in OpenSSL itself
510
- or misconfigured SSLContext objects created by users. However, our
511
- support of OpenSSL sockets is barely-tested and likely buggy, too.
512
-
513
- Furthermore, the "sendfile" (or "kgio-sendfile") gem is no longer a
514
- required dependency. It is currently impossible to use zero-copy
515
- system calls with TLS sockets.
516
-
517
- There are also minor cleanups and a bugfix to ensure body#close is
518
- called for folks using body#to_path where `body' is the Rack
519
- response body. This bug affected logging using the 'clogger' gem
520
- when serving static files.
521
-
522
- Shortlog of changes since 1.4.0
523
-
524
- save around 1500 bytes of memory on x86-64
525
- http_response: remove arg for Array#join
526
- remove unused client_max_header_size config
527
- config: use literal symbol array for now
528
- http_response: reduce constants for 100 responses
529
- favor Array#map! for freshly-split arrays
530
- sendfile_compat: remove dependency on pread
531
- extras/autoindex: simplify checking non-.gz
532
- Rakefile: kill more useless gsub use
533
- initial cut at OpenSSL support
534
- test/test_ssl: skip test if SSL on older Rubies
535
- wbuf_common: close body proxies on sendfile abort
536
- bump published Ruby version requirement to 2.0
537
- make sendfile an optional dependency
538
- openssl_client: ignore SSL_accept errors during negotiation
539
-
540
- Disclaimer: the yahns project does not and will never endorse
541
- any commercial entities, including certificate authorities.
542
-
543
- Shpx Nhgubevgl.
544
-
545
- === yahns 1.4.0 / 2014-11-16 11:05 UTC
546
-
547
- Minor internal cleanups and bugfixes.
548
-
549
- * http_client: clear some internal ivars on rack.hijack
550
- * README: minor updates
551
- * extras/autoindex: do not link beyond top-level
552
- * extras/autoindex: fix misnamed variable
553
- * extras/autoindex: integrate with TryGzipStatic
554
- * queue: remove TODO comment for kqueue
555
- * switch to require_relative for internal requires
556
- * README: add OpenSSL exception
557
- * stream_input: favor str.clear instead of str.replace('')
558
- * http_response: skip Date header case-insensitively
559
-
560
- === yahns 1.3.1 - fix large response corruption / 2014-07-16 20:03 UTC
561
-
562
- This release contains a major bug fix noticeable on FreeBSD VMs, but
563
- should affect Linux systems making large responses which require
564
- output buffering, too.
565
-
566
- * test_server: avoid multiple workers for dead parent check
567
- * wbuf: avoid corrupted large responses with zero-copy sendfile
568
-
569
- === yahns 1.3.0 - new mailing list + fixups / 2014-05-12 01:44 UTC
570
-
571
- Since RubyForge is going away, this release updates the
572
- documentation to point to the new public-inbox and mailing list
573
- at at:
574
-
575
- yahns-public@yhbt.net
576
- (no subscription required, plain text only)
577
-
578
- ssoma[1] git archives: git://yhbt.net/yahns-public
579
- browser-friendly archives: http://yhbt.net/yahns-public/
580
- Traditional mailing list subscription is possible by sending
581
- a blank email to: yahns-public+subscribe@yhbt.net
582
-
583
- This also reworks master->worker signalling to use a pipe,
584
- avoiding problems with libraries which do not respond well
585
- to being interrupted by signals. There are also minor
586
- bugfixes and cleanups, see "git log -p" for full details.
587
-
588
- [1] http://ssoma.public-inbox.org/
589
-
590
- === yahns 1.2.0 - preliminary kqueue/FreeBSD support / 2014-03-15 07:43 UTC
591
-
592
- This release now depends on "kgio-sendfile", a (hopefully temporary)
593
- fork of the original sendfile gem for mainline ruby trunk
594
- compatibility and a (probably correct) FreeBSD-related bugfix.
595
-
596
- kqueue/FreeBSD support is considered highly experimental. Of course;
597
- you should never rely on anything in production unless you can get bugs
598
- fixed in every part of your stack; even the kernel. yahns (ab)uses
599
- kqueue and epoll in uncommon ways, so you may encounter subtle kernel
600
- bugs along the way.
601
-
602
- Because yahns has been self-hosting its own website for months without
603
- crashes or major problems (BORING! :P), I've decided to start hosting the
604
- yahns website <http://yahns.YHBT.net/README> with ruby trunk (currently
605
- r45341).
606
-
607
- yahns - dangerous by design (and sleepy!)
608
-
609
- === yahns 1.1.0 - MOAR SLEEPY / 2014-02-04 22:14 UTC
610
-
611
- On responses with a known, non-zero Content-Length, yahns will now
612
- automatically use the MSG_MORE flag when sending HTTP headers. This
613
- reduces TCP packet transmits and allows clients to wake up and read
614
- one less time.
615
-
616
- This is similar to the TCP_NOPUSH/TCP_CORK functionality of other
617
- servers, but requires no additional syscalls. It is only supported
618
- on the Linux kernel, however (but yahns is currently epoll-only
619
- with kqueue support on the horizon).
620
-
621
- Eric Wong (5):
622
- quiet down EHOSTUNREACH errors
623
- http_response: use kgio_syssend with MSG_MORE
624
- load yahns/version file
625
- socket_helper: remove SO_REUSEPORT define for untested arches
626
- response: do not use MSG_MORE on empty bodies
627
-
628
- === yahns 1.0.0 / 2014-01-02 01:37 UTC
629
-
630
- Mostly fixes for the extras/* stuff running on yahns.YHBT.net and
631
- documentation/packaging fixes. Anyways, this is hosting the
632
- yahns website for a while now (running rack.git) without any
633
- major issues.
634
-
635
- Also, the mailing list will need to move/change because Rubyforge is
636
- going away. Everything I said for the unicorn ML applies to this list,
637
- too: http://mid.gmane.org/20131217015614.GB1125@dcvr.yhbt.net
638
-
639
- === yahns 0.0.3 - more bugfixes, still working! / 2013-11-10 21:42 UTC
640
-
641
- There are several important bugfixes around graceful shutdown.
642
- The shutdown_timeout directive should work more consistently
643
- and work even if an app is streaming/trickling slowly to
644
- a client.
645
-
646
- This also plugs an odd FD leak in response buffering.
647
-
648
- There's also some internal comments/documentation for folks
649
- reviewing the strange internals of yahns.
650
-
651
- Otherwise, it seems to be capable of serving its own website,
652
- http://yahns.yhbt.net/README quite well.
653
-
654
- Rack application authors merely need to write code as if they have a
655
- gun to their head if they expect to keep code running on yahns.
656
- Again, yahns is extremely intolerant of bugs in the applications
657
- it hosts. Otherwise I'm comfortable in the stability of yahns
658
- itself.
659
-
660
- Eric Wong (17):
661
- http_client: do not dump backtrace on ETIMEDOUT
662
- ensure we close response body if buffering caught up
663
- http_response: reorder wbuf_maybe on successful early flush
664
- wbuf: document reasoning for the design of these clases
665
- build: improve NEWS generation, add atom feed
666
- exec_cgi: release pipe/pid sooner
667
- SIGWINCH works after SIGUSR2 upgrades
668
- shutdown_timeout works around long-running response/apps
669
- doc: recommend worker_processes if the app uses SIGCHLD
670
- fdmap: simplify IO expiry interface
671
- fdmap: document + fix for level-trigger
672
- queue_epoll: document epoll concurrency caveats
673
- doc: caution users against disabling buffering
674
- queue: eliminate :wait_readwrite
675
- test: exec_cgi test uses worker_processes
676
- test_server: remove unneccessary IO#wait call
677
- test: workaround sockets not being binary on rbx
678
-
679
- === yahns 0.0.2 - barely working! / 2013-11-06 03:24 UTC
680
-
681
- Lots of bugfixes and tweaks, but everything appears to mostly work
682
- for Rack and HTTP. We are self-hosting our site:
683
-
684
- http://yahns.yhbt.net/README
685
- (And if you can't access it, I screwed something up!)
686
-
687
- There is a yahns-rackup(1) wrapper for quick-starting Rack
688
- applications without having to read any documentation,
689
- as it works exactly like rackup(1) (just leave "-s/--server"
690
- out)
691
-
692
- New manpages: yahns(1), yahns_config(5), yahns-rackup(1)
693
-
694
- Eric Wong (110):
695
- test/helper: correctly handle exit code in test runner
696
- log: workaround atomicity issues for stdio vs non-stdio descriptors
697
- tests: improve output to show RUBY_DESCRIPTION and full path
698
- tests: support disabling parallelization env
699
- test_output_buffering: workaround a rbx bug
700
- socket_helper: do not log sizes on rbx for now
701
- config: do not set cloexec on stdout/stderr
702
- test_wbuf: avoid floating point arg to read_nonblock
703
- rework shutdown for systems w/o rb_thread_fd_close
704
- SIGUSR2 uses fork + exec again instead of Process.spawn
705
- wip for EADDRINUSE failure
706
- test_bin: shutdown socket when not inheriting
707
- README: update with support status for MRI/RBX
708
- server: skip killing acceptors on rbx for now
709
- server (cleanup): avoid interning word for log message
710
- server: abort loudly if we have old threads running
711
- reinstate retry delay for binding new listeners
712
- test/helper: Dir.mktmpdir works without blocks
713
- rework acceptor thread shutdown (again)
714
- server (minor cleanup): use Symbol#to_proc
715
- test_server: remove skipped multi-process balance test
716
- tests: do not lose exceptions on quit timeouts
717
- tests: enforce close_on_exec on all client sockets
718
- server: switch abort to raise on BUG
719
- config: implement atfork handlers
720
- test/server_helper: fix undefined variable
721
- favor client timeout if lower than desperate timeout
722
- tests: enable checks for desperate client expiry
723
- implement + test Expect: 100-continue handling
724
- quitter: save one syscall and implement for non-eventfd
725
- enforce FD_CLOEXEC on all pipes, including tests
726
- test_expect_100: cleanup unused var
727
- http_client: reduce the size of the yahns_step method
728
- output_buffering handles odd EAGAIN cases
729
- fix output buffer corner-case for static files
730
- tests: increase mkserver use to reduce LoC
731
- fix SIGCHLD w/o workers + PID file renames
732
- test_client_expire: disable output buffering in test
733
- StreamFile and TmpIO attempt expiry on EMFILE/ENFILE
734
- server: avoid metaclass for acceptors
735
- support SO_REUSEPORT on new listeners (:reuseport)
736
- doc: ignore RDoc for all internal classes
737
- rack: leave RACK_ENV unset by us
738
- associate private/anonymous queues correctly
739
- queue_epoll: remove check for closed descriptor
740
- config: disallow defining new, named queues inside app
741
- doc: preliminary manpages for yahns(1), yahns_config(5)
742
- config: comment for atfork_* hook definitions
743
- implement user switching
744
- configurator: validate :reuseport for boolean-ess
745
- config: working_directory is only called at top-level
746
- server: fix out-of-date comment regarding bind/pid order
747
- config: reject negative float for client_expire_ratio
748
- lower client_body_buffer_size to 8K (from 114K)
749
- implement client_timeout for streaming inputs
750
- gem: install manpages in the RubyGems package
751
- stream_input: use thread-local rbuf to avoid some garbage
752
- test output_buffering with hijacked responses
753
- test_input: close client when we're done with it
754
- allow multiple blocking threads per listen socket
755
- acceptor: account for inheriting dead descriptors
756
- server: fix incorrect receiver of method call
757
- socket_helper: account for undefined options
758
- test for binding Unix stream sockets
759
- Rack hijack issues EPOLL_CTL_DEL
760
- config: raise ArgumentError for consistency
761
- tests for SIGTTIN and SIGTTOU
762
- use Hash#each instead of Hash#each_pair
763
- add test for working_directory config parameter
764
- test_unix_socket: remember to close IO when done
765
- test for overriding rack.errors destination
766
- test_server: improve working_directory test robustness
767
- fdmap: prevent possible/theoretical race
768
- implement shutdown_timeout and expiry on graceful shutdown
769
- doc: fix client_timeout documentation in yahns_config
770
- implement before_exec hook
771
- comment to explain YAHNS_FD env
772
- remove "worker_" prefix from atfork hooks
773
- remove arity enforcement for atfork_* hooks
774
- allow atfork_* hooks inside app blocks for ease-of-management
775
- doc: disambiguate threads: option for listen directive
776
- yahns-rackup launcher
777
- enable client expiry for non-TCP sockets
778
- config: allow Float for timeouts
779
- tests: more intelligent waiting for output buffering
780
- doc: add HACKING/INSTALL docs + minitest dependency
781
- wbuf: bypass buffering if buffers are caught up
782
- wbuf: reset FS (sendfile) buffer if caught up
783
- wbuf: only enable bypass if we've truncated
784
- input and output buffers support tmpdir: arguments
785
- tests: further speed up output buffering test
786
- test trysendfile usage with UNIX sockets
787
- client_expire_generic: drop kgio_write wrapper
788
- remove unnecessary map(&:to_s) before Array#join
789
- account for truncated/expanded static files
790
- http: do not drop Content-Range from response headers
791
- worker-less server should not waitpid indiscriminately
792
- stream_file: only close FDs we opened ourselves
793
- tests: smaller buffer for big header test
794
- add extras for exec_cgi and try_gzip_static
795
- http_response: fix app-controlled close + test
796
- examples: flesh out the example configs a bit
797
- README: add disclaimer
798
- server: improve shutdown messages
799
- extras: add README
800
- extras: add autoindex module
801
- extras: add proxy_pass Rack app
802
- rackup_handler: fix ordering of working_directory
803
- worker: avoid double SIGQUIT on unexpected parent death
804
- server: log error instead of raising for leftover socks
805
-
806
- === yahns 0.0.1 - many small fixes and test coverage / 2013-10-20 01:00 UTC
807
-
808
- Just a bunch of improvements found while running tests.
809
- It's still incomplete and missing a bunch of features from
810
- existing servers, but maybe it works...
811
-
812
- Clone git://yhbt.net/yahns.git for full details
813
-
814
- Eric Wong (18):
815
- test/helper: fix __covmerge race for forked processes
816
- wire up client_max_body_size limits
817
- fix and test Rack hijack support
818
- SIGUSR2 handling uses Process.spawn + tests
819
- fix USR1 log reopening when using worker_processes
820
- test_bin: add additional tests for SIGHUP
821
- test_server: skip test_mp_balance for now
822
- test/server_helper: dump entire log on errors
823
- ensure we stop all threads at exit
824
- GNUmakefile: avoid calling exit in test-mt
825
- test_bin: set close-on-exec for Ruby 1.9.3 compatibility
826
- test_server: bigger delays for graceful shutdown test
827
- tests: disable $-w on 1.9.3 to quiet down warnings
828
- test/helper: prevent minitest at_exit from running in children
829
- recheck IO#closed? on thread pools after a short delay
830
- test_config: isolate directories with logs
831
- test_reopen_logs: workaround timing problem with worker_processes
832
- set close-on-exec on all long-lived descriptors
325
+ yahns 1.12.2 - minor doc and TLS fixes / 2016-03-01
326
+ ---------------------------------------------------
833
327
 
328
+ This release ensures OpenSSL::SSL::SSLContext#session_id_context
329
+ is always set for OpenSSL users. It won't overwrite existing
330
+ settings, but setting it to a random value is necessary to
331
+ ensure clients do not get aborted connections when attempting to
332
+ use a session cache.
333
+
334
+ No need to actually upgrade if you're on 1.12.1, you may add the
335
+ following to your yahns_config(5) file where
336
+ OpenSSL::SSL::SSLContext is configured:
337
+
338
+ # recommended, not required. This sets safer defaults
339
+ # provided by Ruby on top of what OpenSSL gives:
340
+ ssl_ctx.set_params
341
+
342
+ # required, and done by default in v1.12.2:
343
+ ssl_ctx.session_id_context ||= OpenSSL::Random.random_bytes(32)
344
+
345
+ yahns gives you full control of of how OpenSSL::SSL::SSLContext is
346
+ configured. To avoid bugs, yahns only ensures
347
+ OpenSSL::SSL::SSLContext#session_id_context is set (if not previously
348
+ set by the user) and calls OpenSSL::SSL::SSLContext#setup before
349
+ spawning threads to avoid race conditions. yahns itself does not and
350
+ will not enforce any opinion on the compatibility/performance/security
351
+ trade-offs regarding TLS configuration.
352
+
353
+ Note: keep in mind using an SSL session cache may be less useful
354
+ with yahns because HTTP/1.1 persistent connections may live
355
+ forever :)
356
+
357
+ 3 bug/doc fixes on top of v1.12.1:
358
+ document OpenSSL::SSL::SSLContext#set_params use
359
+ ssl: ensure is session_id_context is always set
360
+ test/*: fix mktmpdir usage for 1.9.3
361
+
362
+ yahns 1.12.1 - more TLS fixes / 2016-02-22
363
+ ------------------------------------------
364
+
365
+ Most notably release fixes TLS output buffering for large
366
+ responses to slow clients. For Rack HTTPS users,
367
+ env['SERVER_PORT'] also defaults to 443 properly unless the
368
+ Host: request header specifies differently.
369
+
370
+ Also, the extras/autoindex change is to make our own directory
371
+ listing look nicer as we use Let's Encrypt and don't want to
372
+ waste space listing ".well-known/" directory contents on:
373
+
374
+ https://yahns.yhbt.net/
375
+
376
+ Yes, we really do care how our homepage looks!
377
+
378
+ 6 changes since v1.12.1:
379
+ extras/autoindex: support hiding dotfiles
380
+ fix output buffering with SSL_write
381
+ https: ensure SERVER_PORT defaults to 443
382
+ test_ssl: check SERVER_PORT when parsed from Host: header
383
+ doc: mention kqueue/kevent alongside epoll
384
+ doc: more minor updates
385
+
386
+ yahns 1.12.0 - TLS fixes and more! / 2016-02-14
387
+ -----------------------------------------------
388
+
389
+ Most notably, serving static files over HTTPS did not work
390
+ before this release with the "sendfile" gem installed. The
391
+ yahns_config(5) manpage is also updated with an example for
392
+ using OpenSSL::SSL::SSLContext objects. Users of
393
+ Rack::Request#scheme and env['rack.url_scheme'] should see
394
+ "https" properly set for HTTPS connections.
395
+
396
+ There's also a bunch of internal tweaks like taking advantage of
397
+ the file-level frozen_string_literal: directive in 2.3 and
398
+ explicitly clearing short-lived string buffers
399
+
400
+ TLS support is still in its early stages, but I'm experimenting
401
+ with Let's Encrypt (via getssl[1]) and hosting https://YHBT.net/
402
+ on it.
403
+
404
+ For now, I suggest using a separate yahns instance (with a
405
+ different master process) to avoid any potential data leaks
406
+ between HTTPS and HTTP instances. In the future, it may be
407
+ possible to isolate HTTPS from HTTP at the worker process level.
408
+ Supporting GnuTLS (alongside OpenSSL) may be in our future, too.
409
+
410
+ To paraphrase the warning in http://www.postfix.org/TLS_README.html
411
+ (which was written before Heartbleed):
412
+
413
+ WARNING
414
+
415
+ By turning on TLS support in yahns, you not only get the
416
+ ability to encrypt traffic and to authenticate remote
417
+ clients. You also turn on thousands and thousands of
418
+ lines of OpenSSL library code. Assuming that OpenSSL is
419
+ written as carefully as Eric's own code, every 1000 lines
420
+ introduce one additional bug into yahns.
421
+
422
+ I'm not nearly as careful with yahns as Wietse is with postfix,
423
+ either.
424
+
425
+ 20 changes since v1.11.0:
426
+ README: updates for kqueue
427
+ add .gitattributes for Ruby method detection
428
+ nodoc internals
429
+ enable frozen_string_literal for Ruby 2.3+
430
+ copyright updates for 2016
431
+ extras/exec_cgi: fix frozen string error on slow responses
432
+ avoid StringIO#binmode for the next few years
433
+ use String#clear for short-lived buffers we create
434
+ gemspec: make rack a development dependency
435
+ build: install-gem forced to "--local" domain
436
+ acceptor: all subclasses of TCPServer use TCP_INFO
437
+ properly emulate sendfile for OpenSSL sockets
438
+ avoid race conditions in OpenSSL::SSL::SSLContext#setup
439
+ set HTTPS and rack.url_scheme in Rack env as appropriate
440
+ proxy_pass: pass X-Forwarded-Proto through
441
+ doc: switch to perlpod (from pandoc-flavored Markdown)
442
+ doc: trim down documentation slightly
443
+ doc: document ssl_ctx for "listen" directive
444
+ doc: various doc and linkification improvements
445
+ http_context: reduce constant lookup + bytecode
446
+
447
+ [1] git clone https://github.com/srvrco/getssl.git
448
+
449
+ yahns 1.11.0 - more minor updates / 2015-12-13
450
+ ----------------------------------------------
451
+
452
+ There's some minor test case fixes and documentation updates.
453
+
454
+ For OpenSSL users running the Ruby 2.3.0 preview releases,
455
+ we now use `exception: false' for for accept_nonblock to reduce
456
+ exceptions. Non-SSL I/O still uses kgio for now.
457
+
458
+ 6 changes since 1.10.0:
459
+ wbuf: fix typo in bug check for sendfile gem
460
+ test_wbuf: deal with proper zero-copy for Unix sockets
461
+ README: clarify and update copyright year
462
+ doc: document and reference sd_listen_fds(3) behavior
463
+ test_server: fix race condition in hooks test
464
+ openssl_client: use `exception: false' for accept_nonblock
465
+
466
+ yahns 1.10.0 - minor updates / 2015-11-01
467
+ -----------------------------------------
468
+
469
+ * test_client_expire: favor Process.spawn over fork+exec
470
+ * extras/try_gzip_static: require readability on HEAD requests
471
+ * proxy_pass: quiet down ECONNRESET and EPIPE, too
472
+ * copyright updates
473
+ * update various comments
474
+ * proxy_http_response: use frozen string literal optimization
475
+ * README: add link to NNTP archive endpoint
476
+ * use olddoc 1.1.0 for generating NEWS + NEWS.atom.xml
477
+ * gemspec fixes for various RubyGems versions
478
+ * bytecode golfing to cut a few bytes of memory
479
+ * simplify sd_listen_fds emulation
480
+ * gemspec: allow compatibility with unicorn 5
481
+
482
+ yahns 1.9.0 - minor updates / 2015-07-21
483
+ ----------------------------------------
484
+
485
+ This release improves socket inheritance support. TCP socket
486
+ options are now applied to inherited sockets. We also emulate
487
+ the sd_listen_fds function to allow inheriting sockets from
488
+ systemd.
489
+
490
+ HTTP status strings are now generated dynamically, allowing
491
+ applications to modify Rack::Utils::HTTP_STATUS_CODES to
492
+ apply changes in the Rack response. Unfortunately, this leads
493
+ to minor (likely unnoticeable) performance regressions.
494
+
495
+ However, our code is not optimized for Ruby 2.2+, so users on
496
+ the latest released Ruby will benefit from reduced inline cache
497
+ and constant lookups as we reduced our constant footprint.
498
+ Expect further minor performance regressions if you are running
499
+ Ruby 2.2 and earlier.
500
+
501
+ For Ruby 2.2 users, overall performance should be largely
502
+ unchanged from 1.7.0 to 1.8.0
503
+
504
+ shortlog of changes since 1.7.0:
505
+
506
+ * use opt_str_freeze for Hash#delete
507
+ * test/helper: warn atomically
508
+ * generate response status strings dynamically
509
+ * reduce constants and optimize for Ruby 2.2+
510
+ * http_response: reduce bytecode size
511
+ * apply TCP socket options on inherited sockets
512
+ * test/test_rack_hijack.rb: try to increase test reliability
513
+ * emulate sd_listen_fds for systemd support
514
+ * test/test_rack_hijack: ensure proper ordering of log messages
515
+
516
+ yahns 1.8.0 - minor updates / 2015-06-11
517
+ ----------------------------------------
518
+
519
+ Most notably, the Rack response body is now closed during rack.hijack.
520
+
521
+ Middlewares such as Rack::Lock (used by Rails) break badly unless
522
+ the response body is closed on hijack, so we will close it to follow
523
+ the lead of other popular Rack servers.
524
+
525
+ While it's unclear if there's anybody using rack.hijack besides
526
+ yahns/proxy_pass we'll try to emulate the behavior of other servers
527
+ as much as possible.
528
+
529
+ ref: https://github.com/ngauthier/tubesock/issues/10
530
+
531
+ We'll also support SIGWINCH if not daemonized
532
+
533
+ This has no effect for the (default) single process case with
534
+ no master/worker relationship as that does not support SIGWINCH.
535
+
536
+ Some process managers such as foreman and daemontools rely on
537
+ yahnsnot daemonizing, but we still want to be able to process
538
+ SIGWINCH in that case.
539
+
540
+ stdout and stderr may be redirected to a pipe (for cronolog or
541
+ similar process), so those are less likely to be attached to a TTY
542
+ than stdin. This also allows users to process SIGWINCH when running
543
+ inside a regular terminal if they redirect stdin to /dev/null.
544
+
545
+ This follows unicorn commit a6077391bb62d0b13016084b0eea36b987afe8f0
546
+ Thanks to Dan Moore for suggesting it on the unicorn list.
547
+
548
+ A few more minor changes, more memory reduction changes coming...
549
+
550
+ * proxy_pass: no point in closing StringIO
551
+ * proxy_pass: allow filtering or overriding response headers
552
+ * support SIGWINCH even if not daemonized
553
+ * use Unicorn::HttpParser#response_start_sent accessor
554
+ * reduce inline constant cache overheads
555
+ * proxy_pass: skip tests if kcar is missing
556
+ * ensure body is closed during hijack
557
+
558
+ yahns 1.7.0 - rack.hijack improvements and more / 2015-05-11
559
+ ------------------------------------------------------------
560
+
561
+ Nothing really significant, so there's no need to upgrade if
562
+ you're not affected by the minor fixes and changes in this
563
+ release.
564
+
565
+ For all users, LoadError and SyntaxError exceptions are now
566
+ logged and non-fatal within worker threads serving application
567
+ code. Thanks to Lin Jen-Shin <godfat@godfat.org> for bringing
568
+ this up on the mailing list.
569
+
570
+ Additionally, temporary files buffered to the filesystem will
571
+ now support the Rack::TempfileReaper middleware in rack 1.6+
572
+
573
+ For rack.hijack users, there are some changes and improvements.
574
+ rack.hijack should return a usable IO-like object for SSL users,
575
+ now. The rack.input object is no longer closed on hijacking,
576
+ allowing apps to continue using buffered input after hijacking.
577
+ There is also a bugfix for the rare apps which hijack requests
578
+ after emitting 100-continue responses.
579
+
580
+ Note: there is also a work-in-progress and under-documented
581
+ asynchronous Yayns::ProxyPass Rack app which uses rack.hijack
582
+ internally. This will allow yahns to act as a fully-buffering
583
+ reverse proxy to upstream servers which cannot handle slow
584
+ clients. Yahns::ProxyPass NOT production-ready as of this
585
+ release. The old, synchronous extras/proxy_pass.rb code
586
+ remains usable.
587
+
588
+ There's also the usual round of minor code bloat reduction.
589
+
590
+ yahns 1.6.0 - reduced allocations and bugfixes / 2015-03-09
591
+ -----------------------------------------------------------
592
+
593
+ This release fixes a bug where previously-configured-but-now-removed
594
+ listeners were inherited across USR2 upgrades are not shutdown
595
+ immediately in the child.
596
+
597
+ There are also minor reductions in allocations which can save a few
598
+ hundred bytes statically and also whenever write buffering is necessary
599
+ for large responses.
600
+
601
+ Some minor documentation updates improvements in extras, too.
602
+
603
+ shortlog of changes since 1.5.0:
604
+ README: add link to mailing list archives
605
+ test_ssl: factor out server SSLContext creation
606
+ doc: add design_notes document
607
+ reduce File::Stat object allocations
608
+ update comments about wbuf_close return values
609
+ wbuf: lazily (re)create temporary file
610
+ fix compatibility with unicorn.git
611
+ skip tests requiring String#b on 1.9.3
612
+ use the monotonic clock under Ruby 2.1+
613
+ favor Class.new for method-less classes
614
+ extras/proxy_pass: save memory in String#split arg
615
+ extras/proxy_pass: do not name unused variable
616
+ extras/proxy_pass: log exceptions leading to 502
617
+ extras/proxy_pass: flesh out upload support + tests
618
+ acceptor: close inherited-but-unneeded sockets
619
+
620
+ See the git repository for more: git clone git://yhbt.net/yahns
621
+
622
+ yahns 1.5.0 - initial OpenSSL support and bugfixes / 2014-12-21
623
+ ---------------------------------------------------------------
624
+
625
+ This release adds basic OpenSSL support for HTTPS connections.
626
+
627
+ Users must supply a OpenSSL::SSL::SSLContext object which yahns will use
628
+ as-is. yahns will only support HTTPS on Ruby 2.1 and later, as we rely
629
+ on "exception: false" in the read_nonblock and write_nonblock methods in
630
+ OpenSSL::SSL::SSLSocket.
631
+
632
+ See the Ruby standard library documentation on how to configure
633
+ OpenSSL::SSL::SSLContext objects to pass to the yahns "listen" directive
634
+ Editing the yahns config file to use OpenSSL goes something like this:
635
+
636
+ require 'openssl' # we will not do this for the user, even
637
+ ctx = OpenSSL::SSL::SSLContext.new
638
+ # user must configure ctx here...
639
+
640
+ listen 443, ssl_ctx: ctx
641
+
642
+ Note: yahns developers are not responsible for bugs in OpenSSL itself
643
+ or misconfigured SSLContext objects created by users. However, our
644
+ support of OpenSSL sockets is barely-tested and likely buggy, too.
645
+
646
+ Furthermore, the "sendfile" (or "kgio-sendfile") gem is no longer a
647
+ required dependency. It is currently impossible to use zero-copy
648
+ system calls with TLS sockets.
649
+
650
+ There are also minor cleanups and a bugfix to ensure body#close is
651
+ called for folks using body#to_path where `body' is the Rack
652
+ response body. This bug affected logging using the 'clogger' gem
653
+ when serving static files.
654
+
655
+ Shortlog of changes since 1.4.0
656
+
657
+ save around 1500 bytes of memory on x86-64
658
+ http_response: remove arg for Array#join
659
+ remove unused client_max_header_size config
660
+ config: use literal symbol array for now
661
+ http_response: reduce constants for 100 responses
662
+ favor Array#map! for freshly-split arrays
663
+ sendfile_compat: remove dependency on pread
664
+ extras/autoindex: simplify checking non-.gz
665
+ Rakefile: kill more useless gsub use
666
+ initial cut at OpenSSL support
667
+ test/test_ssl: skip test if SSL on older Rubies
668
+ wbuf_common: close body proxies on sendfile abort
669
+ bump published Ruby version requirement to 2.0
670
+ make sendfile an optional dependency
671
+ openssl_client: ignore SSL_accept errors during negotiation
672
+
673
+ Disclaimer: the yahns project does not and will never endorse
674
+ any commercial entities, including certificate authorities.
675
+
676
+ Shpx Nhgubevgl.
677
+
678
+ yahns 1.4.0 / 2014-11-16
679
+ ------------------------
680
+
681
+ Minor internal cleanups and bugfixes.
682
+
683
+ * http_client: clear some internal ivars on rack.hijack
684
+ * README: minor updates
685
+ * extras/autoindex: do not link beyond top-level
686
+ * extras/autoindex: fix misnamed variable
687
+ * extras/autoindex: integrate with TryGzipStatic
688
+ * queue: remove TODO comment for kqueue
689
+ * switch to require_relative for internal requires
690
+ * README: add OpenSSL exception
691
+ * stream_input: favor str.clear instead of str.replace('')
692
+ * http_response: skip Date header case-insensitively
693
+
694
+ yahns 1.3.1 - fix large response corruption / 2014-07-16
695
+ --------------------------------------------------------
696
+
697
+ This release contains a major bug fix noticeable on FreeBSD VMs, but
698
+ should affect Linux systems making large responses which require
699
+ output buffering, too.
700
+
701
+ * test_server: avoid multiple workers for dead parent check
702
+ * wbuf: avoid corrupted large responses with zero-copy sendfile
703
+
704
+ yahns 1.3.0 - new mailing list + fixups / 2014-05-12
705
+ ----------------------------------------------------
706
+
707
+ Since RubyForge is going away, this release updates the
708
+ documentation to point to the new public-inbox and mailing list
709
+ at at:
710
+
711
+ yahns-public@yhbt.net
712
+ (no subscription required, plain text only)
713
+
714
+ ssoma[1] git archives: git://yhbt.net/yahns-public
715
+ browser-friendly archives: http://yhbt.net/yahns-public/
716
+ Traditional mailing list subscription is possible by sending
717
+ a blank email to: yahns-public+subscribe@yhbt.net
718
+
719
+ This also reworks master->worker signalling to use a pipe,
720
+ avoiding problems with libraries which do not respond well
721
+ to being interrupted by signals. There are also minor
722
+ bugfixes and cleanups, see "git log -p" for full details.
723
+
724
+ [1] http://ssoma.public-inbox.org/
725
+
726
+ yahns 1.2.0 - preliminary kqueue/FreeBSD support / 2014-03-15
727
+ -------------------------------------------------------------
728
+
729
+ This release now depends on "kgio-sendfile", a (hopefully temporary)
730
+ fork of the original sendfile gem for mainline ruby trunk
731
+ compatibility and a (probably correct) FreeBSD-related bugfix.
732
+
733
+ kqueue/FreeBSD support is considered highly experimental. Of course;
734
+ you should never rely on anything in production unless you can get bugs
735
+ fixed in every part of your stack; even the kernel. yahns (ab)uses
736
+ kqueue and epoll in uncommon ways, so you may encounter subtle kernel
737
+ bugs along the way.
738
+
739
+ Because yahns has been self-hosting its own website for months without
740
+ crashes or major problems (BORING! :P), I've decided to start hosting the
741
+ yahns website <http://yahns.YHBT.net/README> with ruby trunk (currently
742
+ r45341).
743
+
744
+ yahns - dangerous by design (and sleepy!)
745
+
746
+ yahns 1.1.0 - MOAR SLEEPY / 2014-02-04
747
+ --------------------------------------
748
+
749
+ On responses with a known, non-zero Content-Length, yahns will now
750
+ automatically use the MSG_MORE flag when sending HTTP headers. This
751
+ reduces TCP packet transmits and allows clients to wake up and read
752
+ one less time.
753
+
754
+ This is similar to the TCP_NOPUSH/TCP_CORK functionality of other
755
+ servers, but requires no additional syscalls. It is only supported
756
+ on the Linux kernel, however (but yahns is currently epoll-only
757
+ with kqueue support on the horizon).
758
+
759
+ Eric Wong (5):
760
+ quiet down EHOSTUNREACH errors
761
+ http_response: use kgio_syssend with MSG_MORE
762
+ load yahns/version file
763
+ socket_helper: remove SO_REUSEPORT define for untested arches
764
+ response: do not use MSG_MORE on empty bodies
765
+
766
+ yahns 1.0.0 / 2014-01-02
767
+ ------------------------
768
+
769
+ Mostly fixes for the extras/* stuff running on yahns.YHBT.net and
770
+ documentation/packaging fixes. Anyways, this is hosting the
771
+ yahns website for a while now (running rack.git) without any
772
+ major issues.
773
+
774
+ Also, the mailing list will need to move/change because Rubyforge is
775
+ going away. Everything I said for the unicorn ML applies to this list,
776
+ too: http://mid.gmane.org/20131217015614.GB1125@dcvr.yhbt.net
777
+
778
+ yahns 0.0.3 - more bugfixes, still working! / 2013-11-10
779
+ --------------------------------------------------------
780
+
781
+ There are several important bugfixes around graceful shutdown.
782
+ The shutdown_timeout directive should work more consistently
783
+ and work even if an app is streaming/trickling slowly to
784
+ a client.
785
+
786
+ This also plugs an odd FD leak in response buffering.
787
+
788
+ There's also some internal comments/documentation for folks
789
+ reviewing the strange internals of yahns.
790
+
791
+ Otherwise, it seems to be capable of serving its own website,
792
+ http://yahns.yhbt.net/README quite well.
793
+
794
+ Rack application authors merely need to write code as if they have a
795
+ gun to their head if they expect to keep code running on yahns.
796
+ Again, yahns is extremely intolerant of bugs in the applications
797
+ it hosts. Otherwise I'm comfortable in the stability of yahns
798
+ itself.
799
+
800
+ Eric Wong (17):
801
+ http_client: do not dump backtrace on ETIMEDOUT
802
+ ensure we close response body if buffering caught up
803
+ http_response: reorder wbuf_maybe on successful early flush
804
+ wbuf: document reasoning for the design of these clases
805
+ build: improve NEWS generation, add atom feed
806
+ exec_cgi: release pipe/pid sooner
807
+ SIGWINCH works after SIGUSR2 upgrades
808
+ shutdown_timeout works around long-running response/apps
809
+ doc: recommend worker_processes if the app uses SIGCHLD
810
+ fdmap: simplify IO expiry interface
811
+ fdmap: document + fix for level-trigger
812
+ queue_epoll: document epoll concurrency caveats
813
+ doc: caution users against disabling buffering
814
+ queue: eliminate :wait_readwrite
815
+ test: exec_cgi test uses worker_processes
816
+ test_server: remove unneccessary IO#wait call
817
+ test: workaround sockets not being binary on rbx
818
+
819
+ yahns 0.0.2 - barely working! / 2013-11-06
820
+ ------------------------------------------
821
+
822
+ Lots of bugfixes and tweaks, but everything appears to mostly work
823
+ for Rack and HTTP. We are self-hosting our site:
824
+
825
+ http://yahns.yhbt.net/README
826
+ (And if you can't access it, I screwed something up!)
827
+
828
+ There is a yahns-rackup(1) wrapper for quick-starting Rack
829
+ applications without having to read any documentation,
830
+ as it works exactly like rackup(1) (just leave "-s/--server"
831
+ out)
832
+
833
+ New manpages: yahns(1), yahns_config(5), yahns-rackup(1)
834
+
835
+ Eric Wong (110):
836
+ test/helper: correctly handle exit code in test runner
837
+ log: workaround atomicity issues for stdio vs non-stdio descriptors
838
+ tests: improve output to show RUBY_DESCRIPTION and full path
839
+ tests: support disabling parallelization env
840
+ test_output_buffering: workaround a rbx bug
841
+ socket_helper: do not log sizes on rbx for now
842
+ config: do not set cloexec on stdout/stderr
843
+ test_wbuf: avoid floating point arg to read_nonblock
844
+ rework shutdown for systems w/o rb_thread_fd_close
845
+ SIGUSR2 uses fork + exec again instead of Process.spawn
846
+ wip for EADDRINUSE failure
847
+ test_bin: shutdown socket when not inheriting
848
+ README: update with support status for MRI/RBX
849
+ server: skip killing acceptors on rbx for now
850
+ server (cleanup): avoid interning word for log message
851
+ server: abort loudly if we have old threads running
852
+ reinstate retry delay for binding new listeners
853
+ test/helper: Dir.mktmpdir works without blocks
854
+ rework acceptor thread shutdown (again)
855
+ server (minor cleanup): use Symbol#to_proc
856
+ test_server: remove skipped multi-process balance test
857
+ tests: do not lose exceptions on quit timeouts
858
+ tests: enforce close_on_exec on all client sockets
859
+ server: switch abort to raise on BUG
860
+ config: implement atfork handlers
861
+ test/server_helper: fix undefined variable
862
+ favor client timeout if lower than desperate timeout
863
+ tests: enable checks for desperate client expiry
864
+ implement + test Expect: 100-continue handling
865
+ quitter: save one syscall and implement for non-eventfd
866
+ enforce FD_CLOEXEC on all pipes, including tests
867
+ test_expect_100: cleanup unused var
868
+ http_client: reduce the size of the yahns_step method
869
+ output_buffering handles odd EAGAIN cases
870
+ fix output buffer corner-case for static files
871
+ tests: increase mkserver use to reduce LoC
872
+ fix SIGCHLD w/o workers + PID file renames
873
+ test_client_expire: disable output buffering in test
874
+ StreamFile and TmpIO attempt expiry on EMFILE/ENFILE
875
+ server: avoid metaclass for acceptors
876
+ support SO_REUSEPORT on new listeners (:reuseport)
877
+ doc: ignore RDoc for all internal classes
878
+ rack: leave RACK_ENV unset by us
879
+ associate private/anonymous queues correctly
880
+ queue_epoll: remove check for closed descriptor
881
+ config: disallow defining new, named queues inside app
882
+ doc: preliminary manpages for yahns(1), yahns_config(5)
883
+ config: comment for atfork_* hook definitions
884
+ implement user switching
885
+ configurator: validate :reuseport for boolean-ess
886
+ config: working_directory is only called at top-level
887
+ server: fix out-of-date comment regarding bind/pid order
888
+ config: reject negative float for client_expire_ratio
889
+ lower client_body_buffer_size to 8K (from 114K)
890
+ implement client_timeout for streaming inputs
891
+ gem: install manpages in the RubyGems package
892
+ stream_input: use thread-local rbuf to avoid some garbage
893
+ test output_buffering with hijacked responses
894
+ test_input: close client when we're done with it
895
+ allow multiple blocking threads per listen socket
896
+ acceptor: account for inheriting dead descriptors
897
+ server: fix incorrect receiver of method call
898
+ socket_helper: account for undefined options
899
+ test for binding Unix stream sockets
900
+ Rack hijack issues EPOLL_CTL_DEL
901
+ config: raise ArgumentError for consistency
902
+ tests for SIGTTIN and SIGTTOU
903
+ use Hash#each instead of Hash#each_pair
904
+ add test for working_directory config parameter
905
+ test_unix_socket: remember to close IO when done
906
+ test for overriding rack.errors destination
907
+ test_server: improve working_directory test robustness
908
+ fdmap: prevent possible/theoretical race
909
+ implement shutdown_timeout and expiry on graceful shutdown
910
+ doc: fix client_timeout documentation in yahns_config
911
+ implement before_exec hook
912
+ comment to explain YAHNS_FD env
913
+ remove "worker_" prefix from atfork hooks
914
+ remove arity enforcement for atfork_* hooks
915
+ allow atfork_* hooks inside app blocks for ease-of-management
916
+ doc: disambiguate threads: option for listen directive
917
+ yahns-rackup launcher
918
+ enable client expiry for non-TCP sockets
919
+ config: allow Float for timeouts
920
+ tests: more intelligent waiting for output buffering
921
+ doc: add HACKING/INSTALL docs + minitest dependency
922
+ wbuf: bypass buffering if buffers are caught up
923
+ wbuf: reset FS (sendfile) buffer if caught up
924
+ wbuf: only enable bypass if we've truncated
925
+ input and output buffers support tmpdir: arguments
926
+ tests: further speed up output buffering test
927
+ test trysendfile usage with UNIX sockets
928
+ client_expire_generic: drop kgio_write wrapper
929
+ remove unnecessary map(&:to_s) before Array#join
930
+ account for truncated/expanded static files
931
+ http: do not drop Content-Range from response headers
932
+ worker-less server should not waitpid indiscriminately
933
+ stream_file: only close FDs we opened ourselves
934
+ tests: smaller buffer for big header test
935
+ add extras for exec_cgi and try_gzip_static
936
+ http_response: fix app-controlled close + test
937
+ examples: flesh out the example configs a bit
938
+ README: add disclaimer
939
+ server: improve shutdown messages
940
+ extras: add README
941
+ extras: add autoindex module
942
+ extras: add proxy_pass Rack app
943
+ rackup_handler: fix ordering of working_directory
944
+ worker: avoid double SIGQUIT on unexpected parent death
945
+ server: log error instead of raising for leftover socks
946
+
947
+ yahns 0.0.1 - many small fixes and test coverage / 2013-10-20
948
+ -------------------------------------------------------------
949
+
950
+ Just a bunch of improvements found while running tests.
951
+ It's still incomplete and missing a bunch of features from
952
+ existing servers, but maybe it works...
953
+
954
+ Clone git://yhbt.net/yahns.git for full details
955
+
956
+ Eric Wong (18):
957
+ test/helper: fix __covmerge race for forked processes
958
+ wire up client_max_body_size limits
959
+ fix and test Rack hijack support
960
+ SIGUSR2 handling uses Process.spawn + tests
961
+ fix USR1 log reopening when using worker_processes
962
+ test_bin: add additional tests for SIGHUP
963
+ test_server: skip test_mp_balance for now
964
+ test/server_helper: dump entire log on errors
965
+ ensure we stop all threads at exit
966
+ GNUmakefile: avoid calling exit in test-mt
967
+ test_bin: set close-on-exec for Ruby 1.9.3 compatibility
968
+ test_server: bigger delays for graceful shutdown test
969
+ tests: disable $-w on 1.9.3 to quiet down warnings
970
+ test/helper: prevent minitest at_exit from running in children
971
+ recheck IO#closed? on thread pools after a short delay
972
+ test_config: isolate directories with logs
973
+ test_reopen_logs: workaround timing problem with worker_processes
974
+ set close-on-exec on all long-lived descriptors
975
+
976
+ yahns 0.0.0 - hopefully fix installation problems / 2013-10-18
977
+ --------------------------------------------------------------
978
+
979
+ Installing prrerelease versions are strange on RubyGems.
980
+ Anyways, new project, no risk of breakage, so maybe this
981
+ works better...
982
+
983
+ COPYRIGHT
984
+ ---------
985
+ Copyright (C) 2013-2017 all contributors <yahns-public@yhbt.net>
986
+ License: GPL-3.0+ <https://www.gnu.org/licenses/gpl-3.0.txt>