yahns Ruby server user/dev discussion
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [ANN] yahns 1.12.1 -_- sleepy app server for Ruby
  @ 2016-02-22  0:43  4% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-02-22  0:43 UTC (permalink / raw)
  To: ruby-talk, yahns-public

A Free Software, multi-threaded, non-blocking network
application server designed for low _idle_ power consumption.
It is primarily optimized for applications with occasional users
which see little or no traffic.  yahns currently hosts Rack/HTTP
applications, but may eventually support other application
types.  Unlike some existing servers, yahns is extremely
sensitive to fatal bugs in the applications it hosts.

Changes:

    yahns 1.12.1 - more TLS fixes

    Most notably release fixes TLS output buffering for large
    responses to slow clients.  For Rack HTTPS users,
    env['SERVER_PORT'] also defaults to 443 properly unless the
    Host: request header specifies differently.

    Also, the extras/autoindex change is to make our own directory
    listing look nicer as we use Let's Encrypt and don't want to
    waste space listing ".well-known/" directory contents on:

	https://yahns.yhbt.net/

    Yes, we really do care how our homepage looks!

    6 changes since v1.12.0:
          extras/autoindex: support hiding dotfiles
          fix output buffering with SSL_write
          https: ensure SERVER_PORT defaults to 443
          test_ssl: check SERVER_PORT when parsed from Host: header
          doc: mention kqueue/kevent alongside epoll
          doc: more minor updates

Please note the disclaimer:

  yahns is extremely sensitive to fatal bugs in the apps it hosts.  There
  is no (and never will be) any built-in "watchdog"-type feature to kill
  stuck processes/threads.  Each yahns process may be handling thousands
  of clients; unexpectedly killing the process will abort _all_ of those
  connections.  Lives may be lost!

  yahns hackers are not responsible for your application/library bugs.
  Use an application server which is tolerant of buggy applications
  if you cannot be bothered to fix all your fatal bugs.

* git clone git://yhbt.net/yahns
* http://yahns.yhbt.net/README
* http://yahns.yhbt.net/NEWS.atom.xml
* we only accept plain-text email yahns-public@yhbt.net
* and archive all the mail we receive: http://yhbt.net/yahns-public/
* nntp://news.public-inbox.org/inbox.comp.lang.ruby.yahns

^ permalink raw reply	[relevance 4%]

* [PATCH 2/1] test_ssl: check SERVER_PORT when parsed from Host: header
  @ 2016-02-20 21:44  7% ` Eric Wong
  0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2016-02-20 21:44 UTC (permalink / raw)
  To: yahns-public

We need to ensure SERVER_PORT is still parsed from the Host:
header when it is given, there.
---
 test/test_ssl.rb | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/test/test_ssl.rb b/test/test_ssl.rb
index 5fc2b52..e89a89d 100644
--- a/test/test_ssl.rb
+++ b/test/test_ssl.rb
@@ -114,11 +114,25 @@ def test_ssl_basic
       assert_match %r{\AHTTP/1\.\d 200 OK\r\n}, head
     end
 
+    # use port in Host: header (implemented by unicorn_http parser)
+    exp = '666'
+    client.write("GET /SERVER_PORT HTTP/1.1\r\nHost: example.com:#{exp}\r\n\r\n")
+    re = /#{Regexp.escape(exp)}\z/
+    buf.clear
+    Timeout.timeout(60) do
+      buf << client.readpartial(111) until buf =~ re
+    end
+    head, body = buf.split("\r\n\r\n", 2)
+    assert_equal exp, body
+    assert_match %r{\AHTTP/1\.\d 200 OK\r\n}, head
+
     Net::HTTP.start(insecure.addr[3], insecure.addr[1]) do |h|
       res = h.get('/rack.url_scheme')
       assert_equal 'http', res.body
       res = h.get('/HTTPS')
       assert_equal 'nil', res.body
+      res = h.get('/SERVER_PORT')
+      assert_equal insecure.addr[1].to_s, res.body
     end
 
     # read static file
-- 
EW

^ permalink raw reply related	[relevance 7%]

Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2016-02-14 22:37     [ANN] yahns 1.12.0 -_- sleepy app server for Ruby Eric Wong
2016-02-22  0:43  4% ` [ANN] yahns 1.12.1 " Eric Wong
2016-02-20  3:33     [PATCH] https: ensure SERVER_PORT defaults to 443 Eric Wong
2016-02-20 21:44  7% ` [PATCH 2/1] test_ssl: check SERVER_PORT when parsed from Host: header Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/yahns.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).