diff options
| author | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-11 22:36:11 +0000 |
|---|---|---|
| committer | gotoyuzo <gotoyuzo@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-03-11 22:36:11 +0000 |
| commit | b80d7458a012c3dd7dab6e1d209ba91e04b61f2a (patch) | |
| tree | 9f0324193639f7ca22731bdbbe6eafa23fed7ccf /lib | |
| parent | 033ff1ca41673f48cf107da0598e507c8b647e24 (diff) | |
| download | ruby-b80d7458a012c3dd7dab6e1d209ba91e04b61f2a.tar.gz ruby-b80d7458a012c3dd7dab6e1d209ba91e04b61f2a.tar.xz ruby-b80d7458a012c3dd7dab6e1d209ba91e04b61f2a.zip | |
* lib/webrick/config.rb (WEBrick::Config::General): add
:DoNotReverseLookup.
* lib/webrick/server.rb (WEBrick::GenericServer#accept): call
do_not_reverse_lookup for each socket if :DoNotReverseLookup
is set. [ruby-code:02357]
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@5941 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/webrick/config.rb | 1 | ||||
| -rw-r--r-- | lib/webrick/server.rb | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/lib/webrick/config.rb b/lib/webrick/config.rb index 11e1966f1..9d2365e40 100644 --- a/lib/webrick/config.rb +++ b/lib/webrick/config.rb @@ -33,6 +33,7 @@ module WEBrick :StartCallback => nil, :StopCallback => nil, :AcceptCallback => nil, + :DoNotReverseLookup => nil, } # for HTTPServer, HTTPRequest, HTTPResponse ... diff --git a/lib/webrick/server.rb b/lib/webrick/server.rb index 93e3b2ccf..0668e27b0 100644 --- a/lib/webrick/server.rb +++ b/lib/webrick/server.rb @@ -90,6 +90,9 @@ module WEBrick @tokens.pop # blocks while no token is there. sock = svr.accept sock.sync = true + if @config[:DoNotReverseLookup] + sock.do_not_reverse_lookup = true + end Utils::set_close_on_exec(sock) th = start_thread(sock, &block) th[:WEBrickThread] = true |
