PHP 8.2.31
Preview: config.rb Size: 4.38 KB
/proc/thread-self/root/opt/alt/ruby19/lib64/ruby/1.9.1/webrick/config.rb

#
# config.rb -- Default configurations.
#
# Author: IPR -- Internet Programming with Ruby -- writers
# Copyright (c) 2000, 2001 TAKAHASHI Masayoshi, GOTOU Yuuzou
# Copyright (c) 2003 Internet Programming with Ruby writers. All rights
# reserved.
#
# $IPR: config.rb,v 1.52 2003/07/22 19:20:42 gotoyuzo Exp $

require 'webrick/version'
require 'webrick/httpversion'
require 'webrick/httputils'
require 'webrick/utils'
require 'webrick/log'

module WEBrick
  module Config
    LIBDIR = File::dirname(__FILE__)

    # for GenericServer
    General = {
      :ServerName     => Utils::getservername,
      :BindAddress    => nil,   # "0.0.0.0" or "::" or nil
      :Port           => nil,   # users MUST specify this!!
      :MaxClients     => 100,   # maximum number of the concurrent connections
      :ServerType     => nil,   # default: WEBrick::SimpleServer
      :Logger         => nil,   # default: WEBrick::Log.new
      :ServerSoftware => "WEBrick/#{WEBrick::VERSION} " +
                         "(Ruby/#{RUBY_VERSION}/#{RUBY_RELEASE_DATE})",
      :TempDir        => ENV['TMPDIR']||ENV['TMP']||ENV['TEMP']||'/tmp',
      :DoNotListen    => false,
      :StartCallback  => nil,
      :StopCallback   => nil,
      :AcceptCallback => nil,
      :DoNotReverseLookup => nil,
      :ShutdownSocketWithoutClose => false,
    }

    # for HTTPServer, HTTPRequest, HTTPResponse ...
    HTTP = General.dup.update(
      :Port           => 80,
      :RequestTimeout => 30,
      :HTTPVersion    => HTTPVersion.new("1.1"),
      :AccessLog      => nil,
      :MimeTypes      => HTTPUtils::DefaultMimeTypes,
      :DirectoryIndex => ["index.html","index.htm","index.cgi","index.rhtml"],
      :DocumentRoot   => nil,
      :DocumentRootOptions => { :FancyIndexing => true },
      :RequestCallback => nil,
      :ServerAlias    => nil,
      :InputBufferSize  => 65536, # input buffer size in reading request body
      :OutputBufferSize => 65536, # output buffer size in sending File or IO

      # for HTTPProxyServer
      :ProxyAuthProc  => nil,
      :ProxyContentHandler => nil,
      :ProxyVia       => true,
      :ProxyTimeout   => true,
      :ProxyURI       => nil,

      :CGIInterpreter => nil,
      :CGIPathEnv     => nil,

      # workaround: if Request-URIs contain 8bit chars,
      # they should be escaped before calling of URI::parse().
      :Escape8bitURI  => false
    )

    FileHandler = {
      :NondisclosureName => [".ht*", "*~"],
      :FancyIndexing     => false,
      :HandlerTable      => {},
      :HandlerCallback   => nil,
      :DirectoryCallback => nil,
      :FileCallback      => nil,
      :UserDir           => nil,  # e.g. "public_html"
      :AcceptableLanguages => []  # ["en", "ja", ... ]
    }

    BasicAuth = {
      :AutoReloadUserDB     => true,
    }

    ##
    # Default configuration for WEBrick::HTTPAuth::DigestAuth.
    #
    # :Algorithm:: MD5, MD5-sess (default), SHA1, SHA1-sess
    # :Domain:: An Array of URIs that define the protected space
    # :Qop:: 'auth' for authentication, 'auth-int' for integrity protection or
    #        both
    # :UseOpaque:: Should the server send opaque values to the client?  This
    #              helps prevent replay attacks.
    # :CheckNc:: Should the server check the nonce count?  This helps the
    #            server detect replay attacks.
    # :UseAuthenticationInfoHeader:: Should the server send an
    #                                AuthenticationInfo header?
    # :AutoReloadUserDB:: Reload the user database provided by :UserDB
    #                     automatically?
    # :NonceExpirePeriod:: How long should we store used nonces?  Default is
    #                      30 minutes.
    # :NonceExpireDelta:: How long is a nonce valid?  Default is 1 minute
    # :InternetExplorerHack:: Hack which allows Internet Explorer to work.
    # :OperaHack:: Hack which allows Opera to work.

    DigestAuth = {
      :Algorithm            => 'MD5-sess', # or 'MD5'
      :Domain               => nil,        # an array includes domain names.
      :Qop                  => [ 'auth' ], # 'auth' or 'auth-int' or both.
      :UseOpaque            => true,
      :UseNextNonce         => false,
      :CheckNc              => false,
      :UseAuthenticationInfoHeader => true,
      :AutoReloadUserDB     => true,
      :NonceExpirePeriod    => 30*60,
      :NonceExpireDelta     => 60,
      :InternetExplorerHack => true,
      :OperaHack            => true,
    }
  end
end

Directory Contents

Dirs: 2 × Files: 21

Name Size Perms Modified Actions
httpauth DIR
- drwxr-xr-x 2024-03-03 22:48:05
Edit Download
- drwxr-xr-x 2024-03-03 22:48:05
Edit Download
4.16 KB lrw-r--r-- 2011-06-23 07:22:37
Edit Download
6.90 KB lrw-r--r-- 2010-11-08 20:59:01
Edit Download
912 B lrw-r--r-- 2011-05-17 20:29:58
Edit Download
4.38 KB lrw-r--r-- 2010-09-11 06:21:51
Edit Download
3.03 KB lrw-r--r-- 2011-06-20 06:48:40
Edit Download
707 B lrw-r--r-- 2014-02-14 04:24:27
Edit Download
3.33 KB lrw-r--r-- 2011-05-10 23:37:43
Edit Download
8.85 KB lrw-r--r-- 2011-05-10 00:13:58
Edit Download
12.67 KB lrw-r--r-- 2011-07-22 12:49:34
Edit Download
9.50 KB lrw-r--r-- 2011-06-21 12:58:37
Edit Download
1.61 KB lrw-r--r-- 2011-05-29 14:14:38
Edit Download
7.21 KB lrw-r--r-- 2011-05-10 00:13:58
Edit Download
669 B lrw-r--r-- 2009-10-02 10:45:39
Edit Download
4.95 KB lrw-r--r-- 2011-06-16 21:12:00
Edit Download
10.28 KB lrw-r--r-- 2014-02-14 04:24:27
Edit Download
1.12 KB lrw-r--r-- 2011-05-09 19:22:41
Edit Download
3.60 KB lrw-r--r-- 2011-06-16 21:12:00
Edit Download
5.76 KB lrw-r--r-- 2011-05-10 00:13:58
Edit Download
4.23 KB lrw-r--r-- 2010-07-30 23:26:53
Edit Download
6.23 KB lrw-r--r-- 2012-05-19 05:40:29
Edit Download
353 B lrw-r--r-- 2011-05-09 19:22:41
Edit Download

If ZipArchive is unavailable, a .tar will be created (no compression).