2 # config.rb -- Default configurations.
4 # Author: IPR -- Internet Programming with Ruby -- writers
5 # Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou
6 # Copyright (c) 2003 Internet Programming with Ruby writers. All rights
9 # $IPR: config.rb,v 1.52 2003/07/22 19:20:42 gotoyuzo Exp $
11 require 'webrick/version'
12 require 'webrick/httpversion'
13 require 'webrick/httputils'
14 require 'webrick/utils'
19 LIBDIR = File::dirname(__FILE__)
23 :ServerName => Utils::getservername,
24 :BindAddress => nil, # "0.0.0.0" or "::" or nil
25 :Port => nil, # users MUST specifiy this!!
26 :MaxClients => 100, # maximum number of the concurrent connections
27 :ServerType => nil, # default: WEBrick::SimpleServer
28 :Logger => nil, # default: WEBrick::Log.new
29 :ServerSoftware => "WEBrick/#{WEBrick::VERSION} " +
30 "(Ruby/#{RUBY_VERSION}/#{RUBY_RELEASE_DATE})",
31 :TempDir => ENV['TMPDIR']||ENV['TMP']||ENV['TEMP']||'/tmp',
32 :DoNotListen => false,
33 :StartCallback => nil,
35 :AcceptCallback => nil,
36 :DoNotReverseLookup => nil,
37 :ShutdownSocketWithoutClose => false,
40 # for HTTPServer, HTTPRequest, HTTPResponse ...
41 HTTP = General.dup.update(
43 :RequestTimeout => 30,
44 :HTTPVersion => HTTPVersion.new("1.1"),
46 :MimeTypes => HTTPUtils::DefaultMimeTypes,
47 :DirectoryIndex => ["index.html","index.htm","index.cgi","index.rhtml"],
49 :DocumentRootOptions => { :FancyIndexing => true },
50 :RequestCallback => nil,
52 :InputBufferSize => 65536, # input buffer size in reading request body
53 :OutputBufferSize => 65536, # output buffer size in sending File or IO
56 :ProxyAuthProc => nil,
57 :ProxyContentHandler => nil,
59 :ProxyTimeout => true,
62 :CGIInterpreter => nil,
65 # workaround: if Request-URIs contain 8bit chars,
66 # they should be escaped before calling of URI::parse().
67 :Escape8bitURI => false
71 :NondisclosureName => [".ht*", "*~"],
72 :FancyIndexing => false,
74 :HandlerCallback => nil,
75 :DirectoryCallback => nil,
77 :UserDir => nil, # e.g. "public_html"
78 :AcceptableLanguages => [] # ["en", "ja", ... ]
82 :AutoReloadUserDB => true,
86 :Algorithm => 'MD5-sess', # or 'MD5'
87 :Domain => nil, # an array includes domain names.
88 :Qop => [ 'auth' ], # 'auth' or 'auth-int' or both.
90 :UseNextNonce => false,
92 :UseAuthenticationInfoHeader => true,
93 :AutoReloadUserDB => true,
94 :NonceExpirePeriod => 30*60,
95 :NonceExpireDelta => 60,
96 :InternetExplorerHack => true,