aboutsummaryrefslogtreecommitdiffstats
path: root/lib/webrick/server.rb
diff options
context:
space:
mode:
authorgotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-07 11:05:22 +0000
committergotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-01-07 11:05:22 +0000
commit36c839f233cf77d4992bedc2a26f35b5529eb389 (patch)
treeb30a56334373e885a5336b7966c6491c9b53a058 /lib/webrick/server.rb
parentfe1019c6659b5f628c751d289e73456e1da2313f (diff)
downloadruby-36c839f233cf77d4992bedc2a26f35b5529eb389.tar.gz
* 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
Diffstat (limited to 'lib/webrick/server.rb')
-rw-r--r--lib/webrick/server.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb
index 48d9fcd4ec..47ba4c700f 100644
--- a/lib/webrick/server.rb
+++ b/lib/webrick/server.rb
@@ -31,9 +31,9 @@ module WEBrick
exit!(0) if fork
Dir::chdir("/")
File::umask(0)
- [ STDIN, STDOUT, STDERR ].each{|io|
- io.reopen("/dev/null", "r+")
- }
+ STDIN.reopen("/dev/null")
+ STDOUT.reopen("/dev/null", "w")
+ STDERR.reopen("/dev/null", "w")
yield if block_given?
end
end