Граф коммитов

56 Коммитов

Автор SHA1 Сообщение Дата
John W Higgins f64bea6d66 [ruby/webrick] Allow shutdown_pipe to be passed in via @config
https://github.com/ruby/webrick/commit/30152b4bf9
2020-09-24 21:37:06 +09:00
John W Higgins 4715a24dd2 [ruby/webrick] Ensure server port numbers are numeric and ensure they are stored as integers
https://github.com/ruby/webrick/commit/86ed621e11
2020-09-24 21:31:55 +09:00
marcandre e859e668d2 lib/*: Prefer require_relative over require.
[#15206] [Fix GH-1976]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65505 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-02 17:52:33 +00:00
shyouhei f2a91397fd Add uplevel keyword to Kernel#warn and use it
If uplevel keyword is given, the warning message is prepended
with caller file and line information and the string "warning: ".
The use of the uplevel keyword makes Kernel#warn format output
similar to how rb_warn formats output.

This patch modifies net/ftp and net/imap to use Kernel#warn
instead of $stderr.puts or $stderr.printf, since they are used
for printing warnings.

This makes lib/cgi/core and tempfile use $stderr.puts instead of
warn for debug logging, since they are used for debug printing
and not for warning.

This does not modify bundler, rubygems, or rdoc, as those are
maintained outside of ruby and probably wish to remain backwards
compatible with older ruby versions.

rb_warn_m code is originally from nobu, but I've changed it
so that it only includes the path and lineno from uplevel
(not the method), and also prepends the string "warning: ",
to make it more similar to rb_warn.

From: Jeremy Evans code@jeremyevans.net
Signed-off-by: Urabe Shyouhei shyouhei@ruby-lang.org


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-12 11:56:25 +00:00
normal 22474d8f96 webrick: allow shutdown after StartCallback
We must to ensure the @status ivar is set to :Running before
running StartCallback, otherwise Webrick::Server#stop will not
change the @status to :Shutdown properly.

Note: I have not been able to reproduce the original issue but
understood at least part of the problem and fixed it with this
commit.  However, the original reporter (Peak Xu) was still able
to reproduce the problem on 1.9.2 p180 on Windows, so I'm not
sure what else might be going on.  Ruby threading and
synchronization primitives have changed a lot since 1.9.2, so
maybe that was fixed elsewhere.

* lib/webrick/server.rb: call StartCallback sooner [Bug #4841]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-12-08 18:51:56 +00:00
normal cda27e1a6d webrick: fix up r60172 and r60210
Thanks to MSP-Greg (Greg L) for helping with this.

* lib/webrick/server.rb (start_thread): properly fix non-local return
  introduced in r60208 and r60210

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60211 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-18 23:34:02 +00:00
normal 834c252e5e webrick: fix up r60172 and r60208
Thanks to MSP-Greg (Greg L) for helping with this.

* lib/webrick/server.rb (start_thread): fix non-local return
  introduced in r60208

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-18 23:23:33 +00:00
normal 3b1db7d319 webrick: fix up r60172 and revert r60189
Thanks to MSP-Greg (Greg L) for helping with this.

* lib/webrick/server.rb (start_thread): ignore ECONNRESET, ECONNABORTED,
  EPROTO, and EINVAL on TLS negotiation errors the same way they
  were ignored before r60172 in the accept_client method of the
  main acceptor thread.
  [Bug #14013] [Bug #14005]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-18 21:45:34 +00:00
normal 525ebb862e webrick: fix up r60172
By making the socket non-blocking in r60172, TLS/SSL negotiation
via the SSL_accept function must handle non-blocking sockets
properly and retry on SSL_ERROR_WANT_READ/SSL_ERROR_WANT_WRITE.
OpenSSL::SSL::SSLSocket#accept cannot do that properly with a
non-blocking socket, so it must use non-blocking logic of
OpenSSL::SSL::SSLSocket#accept_nonblock.

Thanks to MSP-Greg (Greg L) for finding this.

* lib/webrick/server.rb (start_thread): use SSL_accept properly
  with non-blocking socket.
  [Bug #14013] [Bug #14005]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-16 04:33:53 +00:00
normal feafe07874 webrick: do not hang acceptor on slow TLS connections
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
2017-10-12 18:50:07 +00:00
normal 4c6335e93b webrick: avoid needless wakeup from IO.select
Since r51231 ("webrick/server.rb: stop immediately"),
there is no need to poll on the @status change every
two seconds.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60144 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-09 19:00:22 +00:00
kazu 6064132c42 Remove unnecessary `require 'thread'`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-08 07:00:01 +00:00
normal 0d2ab887f3 webrick: avoid unnecessary IO#sync= call
Sockets and pipes are always created with FMODE_SYNC flag
already set (otherwise many things would be broken).

* lib/webrick/server.rb (accept_client): remove unnecessary
  IO#sync= call

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-10-05 21:53:54 +00:00
normal 376e57fee1 webrick/server: use symbol proc
Symbol proc is less code and avoids confusion from variable
naming.

* lib/webrick/server.rb (shutdown): use symbol proc

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-23 23:14:15 +00:00
nobu 64676baeef Use `&.` and `||=` instead of if guards
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56875 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-22 23:11:41 +00:00
kazu 71a7931fb3 IOError does not happen
* IOError does not happen even if another thread closes io
* Use symbol proc

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-22 13:59:16 +00:00
normal 3dd924212f webrick/server: simplify Daemon.start
Process.daemon exists since Ruby 1.9.1 and does most of what we need.

* lib/webrick/server.rb (Daemon.start): simplify
  [Misc #12937]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56869 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-22 00:16:23 +00:00
normal f845a9ef76 lib/*: remove closed checks
Follow r56795.  Since Ruby 2.2, calling #close on a closed
socket no longer raises exceptions.

* lib/cgi/session.rb (update): remove closed? check
* lib/net/http.rb (finish, transport_request): ditto
* lib/net/imap.rb (disconnect): ditto
* lib/net/pop.rb (do_start, do_finish): ditto
* lib/net/smtp.rb (do_start, do_finish): ditto
* lib/open3.rb (popen_run, pipeline_run): ditto
* lib/pstore.rb (transaction): ditto
* lib/shell/process-controller.rb (sfork):
* lib/tempfile (_close, call, Tempfile.create): ditto
* lib/webrick/httpauth/htdigest.rb (flush): ditto
* lib/webrick/httpauth/htpasswd.rb (flush): ditto
* lib/webrick/server.rb (start_thread, cleanup_shutdown_pipe): ditto

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56865 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-21 23:05:41 +00:00
nobu 4b298ad77a Use qualified names
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-30 06:22:30 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
hsbt 2ded8d0698 * lib/webrick/server.rb: use IO::NULL instead of '/dev/null'
* test/ruby/test_string.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51709 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-08-27 09:05:48 +00:00
nobu 77cde58d39 webrick/server.rb: stop immediately
* lib/webrick/server.rb (WEBrick::GenericServer#start): flush
  shutdown pipe.
* lib/webrick/server.rb (WEBrick::GenericServer#stop): request the
  server to stop immediately by sending data via shutdown pipe.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51231 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-14 02:20:16 +00:00
normal ce34a90fb5 lib/webrick/server.rb: avoid redundant fcntl call
Sockets are close-on-exec by default since Ruby 2.0, so it
is redundant to set it again.

* lib/webrick/server.rb (accept_client): avoid redundant fcntl call
  [Feature #11137]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50519 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-05-17 05:59:08 +00:00
hsbt 7d75a78604 * lib/webrick/server.rb: Fix regression bug in WEBrick's
:DoNotReverseLookup config option implementation.
  [fix GH-731] Patch by @vais
* test/webrick/test_do_not_reverse_lookup.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49980 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-16 08:43:28 +00:00
akr ab0a64e1c8 * lib/webrick/server.rb: Invoke setup_shutdown_pipe in start method
instead of listen method.
  [ruby-core:68476] [Bug #10956] Reported by Shintaro Kojima.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-03-10 11:05:21 +00:00
hsbt 73fc0cc572 * lib/webrick/utils.rb: removed unused argument variable.
[fix GH-356] Patch by @vipulnsward
* lib/webrick/server.rb: ditto.
* lib/webrick/ssl.rb: ditto.
* test/webrick/test_utils.rb: added test for WEBrick::Utils#create_listeners.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49101 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-01-02 06:53:12 +00:00
akr 33bb38a644 * lib/webrick/server.rb: Setup shutdown pipe in listen method.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48362 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 11:05:00 +00:00
akr 230fb3ceae * lib/webrick/server.rb: Less instance variables.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48355 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 03:46:22 +00:00
akr e62fe866e5 * lib/webrick/server.rb (shutdown): Use close() on @shutdown_pipe_w to
notify readability on the read side of the pipe.
  write_nonblock() is not usable for pipe on Windows.
  (cleanup_shutdown_pipe): Rescue IOError for @shutdown_pipe_w.close.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48354 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-10 03:20:06 +00:00
akr 2a9ea11355 * lib/webrick/server.rb (initialize): Initialize shutdown pipe here
to avoid race condition.
  (cleanup_shutdown_pipe): New private method.
  (cleanup_listener): Extracted from shutdown method.
  Call this method from start method to avoid race condition.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48353 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-09 23:03:40 +00:00
akr a0e4956dce * lib/webrick/server.rb: Stop lisntner loop properly.
[ruby-core:66085] [Bug #10478] Fixed by Charles Nutter.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48285 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-05 10:24:53 +00:00
hsbt c9134128cb * lib/webrick/httpproxy.rb: remvoe useless assigned variables.
* lib/webrick/httpservlet/cgihandler.rb: ditto.
* lib/webrick/httpservlet/erbhandler.rb: ditto.
* lib/webrick/server.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46560 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-06-26 09:05:58 +00:00
akr 6f226d9d42 * lib/webrick/server.rb: Use a pipe to detect server shutdown.
shutdown() or close() for listening socket is not a reliable.
  Actually, both doesn't work (doesn't wake up select()) on
  DragonFly BSD 3.6.2.

* test/webrick/utils.rb: :ShutdownSocketWithoutClose is not required
  now to immediate server shutdown detection.
  This fixes fd leaks.

* test/net/http/utils.rb: Ditto.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46253 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-30 12:32:48 +00:00
nobu 719804b5df webrick/httpserver.rb: Stop handling requests on shutdown
* lib/webrick/httpserver.rb (WEBrick::HTTPServer#run): stop
  handling requests on shutdown, even if the socket is readable
  and IO.select() returns true.  [Fixes GH-607]
* lib/webrick/server.rb (WEBrick::GenericServer#start): IO.select()
  raises ENOTSOCK on shutdown on Windows.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-08 01:17:07 +00:00
drbrain 28afe277a8 * lib/webrick/accesslog.rb: Improved WEBrick documentation.
* lib/webrick/cgi.rb:  ditto.
* lib/webrick/config.rb:  ditto.
* lib/webrick/cookie.rb:  ditto.
* lib/webrick/httpauth/authenticator.rb:  ditto.
* lib/webrick/httpauth/basicauth.rb:  ditto.
* lib/webrick/httpauth/digestauth.rb:  ditto.
* lib/webrick/httpproxy.rb:  ditto.
* lib/webrick/httprequest.rb:  ditto.
* lib/webrick/httpresponse.rb:  ditto.
* lib/webrick/https.rb:  ditto.
* lib/webrick/httpserver.rb:  ditto.
* lib/webrick/httpservlet/cgihandler.rb:  ditto.
* lib/webrick/httpservlet/filehandler.rb:  ditto.
* lib/webrick/httpservlet/prochandler.rb:  ditto.
* lib/webrick/httputils.rb:  ditto.
* lib/webrick/httpversion.rb:  ditto.
* lib/webrick/log.rb:  ditto.
* lib/webrick/server.rb:  ditto.
* lib/webrick/ssl.rb:  ditto.
* lib/webrick/utils.rb:  ditto.
* lib/webrick/version.rb:  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38945 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-01-26 01:12:54 +00:00
naruse c26ea74ad6 * lib/webrick/server.rb (WEBrick::GenericServer#start):
partially revert r35315.

* test/webrick/test_server.rb (test_start_exception):
  received signal is delivered to the main thread, so it is needed to
  emulate it. patched by Eric Hodel. [ruby-core:44348] [Feature #6236]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-14 02:30:43 +00:00
naruse deb0519aec * lib/webrick/server.rb (WEBrick::GenericServer#stop): fix r35303;
this method is to deny new connections, not shutdown yet.

* lib/webrick/server.rb (WEBrick::GenericServer#start):
  re-raise exception only when the exception is Interrupt (^C).

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35315 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-13 06:21:50 +00:00
drbrain 8c5c5a221f * lib/webrick/server.rb (module WEBrick::GenericServer): A server
will now continue only when a StandardError subclass is raised.  For
  other exception types the error will be logged at the fatal level and
  the server will safely stop.  Based on a patch by Alex Young.
  [ruby-trunk - Feature #6236]
* test/webrick/test_server.rb:  Test for new exception handling
  behavior.  Join the server thread instead of busy-waiting for it to
  shut down to remove race conditions.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35303 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-11 20:28:11 +00:00
naruse f898efd8a8 * lib/webrick/server.rb (WEBrick::GenericServer): close socket only if
the socket is not closed yet.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-04-01 18:36:46 +00:00
drbrain 071a678a15 * lib/webrick: Add Documentation
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31499 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-10 00:13:58 +00:00
nobu 287a34ae0d * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
kazu 2d302dfd40 * lib/webrick/server.rb (WEBrick::GenericServer#shutdown):
rescue Errno::ENOTCONN and close. [ruby-dev:35896]

* test/openssl/test_ssl.rb (OpenSSL#start_server): ditto.
  [ruby-dev:35897]

* lib/net/imap.rb (Net::IMAP#disconnect): ditto. [ruby-dev:35898]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@18777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-08-22 11:12:06 +00:00
gotoyuzo a5505ab833 * lib/webrick/server.rb (WEBrick::HTTPServer#start):
:DoNotReverseLookup option had not been performed.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14961 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-01-09 04:46:55 +00:00
gotoyuzo a04281ff0e * lib/webrick/server.rb (WEBrick::GenericServer#accept_client):
should rescue Errno::EINVAL from TCPServer#accept. this exception
  might occur if the server socket is not in ready to listen.

* lib/webrick/server.rb (WEBrick::GenericServer#accept_client):
  don't call TCPServer#close if the :ShutdownSocketWithoutClose is set.

* lib/webrick/config.rb (WEBrick::Config::General): add new parameter
  :ShutdownSocketWithoutClose.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14306 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-18 14:43:03 +00:00
gotoyuzo 9a012539ba * lib/webrick/config.rb (WEBrick::Config::HTTP): add new parameters,
:InputBufferSize and :OutputBufferSize.

* lib/webrick/utils.rb (WEBrick::Utils.timeout): add new timeout
  method. this implementation is expected to be compatible with
  timeout.rb and faster than timeout.rb.

* lib/webrick/httprequest.rb (WEBrick::HTTPRequest#_read_data):
  Timeout.timeout is replaced by WEBrick::Utils.timeout.

* lib/webrick/httprequest.rb: WEBrick::HTTPRequest::BUFSIZE is
  replaced by config[:InputBufferSize].

* lib/webrick/httpresposne.rb: WEBrick::HTTPResponse::BUFSIZE is
  replaced by config[:OutputBufferSize].

* lib/webrick/server.rb: get rid of unnecessary require.

* test/webrick/test_utils.rb: test for WEBrick::Utils.timeout.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-05-18 13:42:52 +00:00
gotoyuzo 8db529ca2b * lib/webrick/server.rb (WEBrick::GenericServer#accept_client):
sockets should be non-blocking mode. [ruby-dev:26405]

* lib/webrick/utils.rb (WEBrick::Utils.set_non_blocking): new method.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8767 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-07-14 22:59:09 +00:00
gotoyuzo 3b6992be67 *** empty log message ***
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-23 10:09:07 +00:00
gotoyuzo d0f6f9fb7a * lib/webrick/server.rb (WEBrick::GenericServer#start): should
restore @token if accept failure. suggested by Dominique Brezinski.
  [ruby-core:04518]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@8105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-03-07 12:32:07 +00:00
gotoyuzo 36c839f233 * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service):
should delete trailing LF from the result of pack("m*").

* lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_connect):
  - should delete trailing LF from the result of pack("m*").
  - clear Request-Line not to send the sesponse by HTTPServer#run.

* lib/webrick/httputils (WEBrick::HTTPUtils.parse_qvalues):
  refine regexp (and change the name of a local variable).

* lib/webrick/server.rb (WEBrick::Daemon.start): prepared stdio
  don't allow changing its mode.

* test/webrick/*, sample/webrick/httpproxy.rb: add new files.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-01-07 11:05:22 +00:00
gotoyuzo 52d91fa402 * lib/webrick/server.rb (WEBrick::GenericServer#start_thread):
should log about all accepted socket. [ruby-core:03962]

* lib/webrick/accesslog.rb (WEBrick::AccessLog#setup_params):
  "%%" and "%u" are supported. [webricken:135]

* lib/webrick/httpservlet/filehandler.rb
  (WEBrick::HTTPServlet::FileHandler#check_filename):
  :NondisclosureName is acceptable if it is Enumerable.

* lib/webrick/config.rb (WEBrick::Config::FileHandler):
  default value of :NondisclosureName is [".ht*", "*~"].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7566 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-15 08:47:49 +00:00