diff options
Diffstat (limited to 'lib/webrick/config.rb')
-rw-r--r-- | lib/webrick/config.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/webrick/config.rb b/lib/webrick/config.rb index 98c9701633..af4b561534 100644 --- a/lib/webrick/config.rb +++ b/lib/webrick/config.rb @@ -20,8 +20,14 @@ module WEBrick LIBDIR = File::dirname(__FILE__) # :nodoc: # for GenericServer - General = { - :ServerName => Utils::getservername, + General = Hash.new { |hash, key| + case key + when :ServerName + hash[key] = Utils.getservername + else + nil + end + }.update( :BindAddress => nil, # "0.0.0.0" or "::" or nil :Port => nil, # users MUST specify this!! :MaxClients => 100, # maximum number of the concurrent connections @@ -36,7 +42,7 @@ module WEBrick :AcceptCallback => nil, :DoNotReverseLookup => true, :ShutdownSocketWithoutClose => false, - } + ) # for HTTPServer, HTTPRequest, HTTPResponse ... HTTP = General.dup.update( |