mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
OpenSSL::SSL::SSLSocket#accept may block indefinitely on clients which negotiate the TCP connection, but fail (or are slow) to negotiate the subsequent TLS handshake. This prevents the multi-threaded WEBrick server from accepting other connections. Since the TLS handshake (via OpenSSL::SSL::SSLSocket#accept) consists of normal read/write traffic over TCP, handle it in the per-client thread, instead. Furthermore, using non-blocking accept() is useful for non-TLS sockets anyways because spurious wakeups are possible from select(2). * lib/webrick/server.rb (accept_client): use TCPServer#accept_nonblock and remove OpenSSL::SSL::SSLSocket#accept call * lib/webrick/server.rb (start_thread): call OpenSSL::SSL::SSLSocket#accept * test/webrick/test_ssl_server.rb (test_slow_connect): new test [ruby-core:83221] [Bug #14005] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60172 b2dd03c8-39d4-4d8f-98ff-823fe69b080e |
||
|---|---|---|
| .. | ||
| .htaccess | ||
| test_cgi.rb | ||
| test_config.rb | ||
| test_cookie.rb | ||
| test_do_not_reverse_lookup.rb | ||
| test_filehandler.rb | ||
| test_htmlutils.rb | ||
| test_httpauth.rb | ||
| test_httpproxy.rb | ||
| test_httprequest.rb | ||
| test_httpresponse.rb | ||
| test_https.rb | ||
| test_httpserver.rb | ||
| test_httputils.rb | ||
| test_httpversion.rb | ||
| test_server.rb | ||
| test_ssl_server.rb | ||
| test_utils.rb | ||
| utils.rb | ||
| webrick.cgi | ||
| webrick_long_filename.cgi | ||