anchor.diff:  
   
   %% global conf
  --record(gconf,{yaws_dir,           %% topdir of Yaws installation
  -               trace,              %% false | {true,http}|{true,traffic}
  -               flags = ?GC_DEF,    %% boolean flags
  -               logdir,
  -               ebin_dir = [],
  -               runmods = [],       %% runmods for entire server
  -               keepalive_timeout = 30000,
  -               keepalive_maxuses = nolimit, %% nolimit or non negative integer
  -               max_num_cached_files = 400,
  -               max_num_cached_bytes = 1000000,  %% 1 MEG
  -               max_size_cached_file = 8000,
  -               max_connections = nolimit, % max number of TCP connections
  -               process_options = [],  % Override default connection handler
  -                                    % processes spawn options for
  -                                    % performance/memory tuning.  [] |
  -                                    % [{fullsweep_after,Number},
  -                                    % {min_heap_size, Size}] other options such
  -                                    % as monitor, link are ignored.
  -               large_file_chunk_size = 10240,
  -               mnesia_dir = [],
  -               log_wrap_size = 10000000,  % wrap logs after 10M
  -               cache_refresh_secs = 30,  % seconds  (auto zero when debug)
  -               include_dir = [],    %% list of inc dirs for .yaws files
  -               phpexe = "/usr/bin/php-cgi",  %% cgi capable php executable
  -               x_forwarded_for_log_proxy_whitelist = [], % list of proxy server
  -                                    % ips we will replace with the last element
  -                                    % of the list in the X-Forwarded-For http
  -                                    % header in logs
  -               yaws,                % server string
  -               id = "default",      % string identifying this instance of yaws
  -               enable_soap = false, % start yaws_soap_srv iff true
  -               soap_srv_mods = [],  % a list of
  -                                    % {{Mod, Func}, WsdlFile, Prefix } |
  -                                    %        {{Mod, Func}, WsdlFile}
  -                                    % automatically setup in yaws_soap_srv init.
  -               ysession_mod = yaws_session_server, % storage module for ysession
  -               acceptor_pool_size = 8              % size of acceptor proc pool
  -              }).
  -
  -
  -
  --record(ssl,
  -        {
  -         keyfile,
  -         certfile,
  -         verify = 0,
  -         fail_if_no_peer_cert,
  -         depth = 1,
  -         password,
  -         cacertfile,
  -         ciphers,
  -         cachetimeout}).
  +-record(gconf,{
  +          yaws_dir,                       % topdir of Yaws installation
  +          trace,                          % false | {true,http} | {true,traffic}
  +          flags = ?GC_DEF,                % boolean flags
  +          logdir,
  +          ebin_dir = [],
  +          runmods  = [],                  % runmods for entire server
  +          keepalive_timeout    = 30000,
  +          keepalive_maxuses    = nolimit, % nolimit or non negative integer
  +          max_num_cached_files = 400,
  +          max_num_cached_bytes = 1000000, % 1 MEG
  +          max_size_cached_file = 8000,
  +          max_connections      = nolimit, % max number of TCP connections
  +
  +          %% Override default connection handler processes spawn options for
  +          %% performance/memory tuning.
  +          %% [] | [{fullsweep_after,Number}, {min_heap_size, Size}]
  +          %% other options such as monitor, link are ignored.
  +          process_options = [],
  +
  +          large_file_chunk_size = 10240,
  +          mnesia_dir            = [],
  +          log_wrap_size         = 10000000, % wrap logs after 10M
  +          cache_refresh_secs    = 30,       % seconds  (auto zero when debug)
  +          include_dir           = [],       % list of inc dirs for .yaws files
  +          phpexe = "/usr/bin/php-cgi",      % cgi capable php executable
  +
  +          %% list of proxy server ips we will replace with the last element of
  +          %% the list in the X-Forwarded-For http header in logs
  +          x_forwarded_for_log_proxy_whitelist = [],
  +
  +          yaws,                % server string
  +          id = "default",      % string identifying this instance of yaws
  +
  +          enable_soap = false, % start yaws_soap_srv iff true
  +
  +          %% a list of
  +          %% {{Mod, Func}, WsdlFile, Prefix} | {{Mod, Func}, WsdlFile}
  +          %% automatically setup in yaws_soap_srv init.
  +          soap_srv_mods = [],
  +
  +          ysession_mod = yaws_session_server, % storage module for ysession
  +          acceptor_pool_size = 8              % size of acceptor proc pool
  +         }).
  +
  +
  +
  +-record(ssl, {
  +          keyfile,
  +          certfile,
  +          verify = 0,
  +          fail_if_no_peer_cert,
  +          depth = 1,
  +          password,
  +          cacertfile,
  +          ciphers,
  +          cachetimeout
  +         }).
   
   
   %% flags for sconfs
  --define(SC_ACCESS_LOG,          1).
  --define(SC_AUTH_LOG,            2).
  --define(SC_ADD_PORT,            4).
  --define(SC_STATISTICS,          8).
  --define(SC_TILDE_EXPAND,        16).
  --define(SC_DIR_LISTINGS,        32).
  --define(SC_DEFLATE,             64).
  --define(SC_DIR_ALL_ZIP,         128).
  --define(SC_DAV,                 512).
  +-define(SC_ACCESS_LOG,             1).
  +-define(SC_AUTH_LOG,               2).
  +-define(SC_ADD_PORT,               4).
  +-define(SC_STATISTICS,             8).
  +-define(SC_TILDE_EXPAND,          16).
  +-define(SC_DIR_LISTINGS,          32).
  +-define(SC_DEFLATE,               64).
  +-define(SC_DIR_ALL_ZIP,          128).
  +-define(SC_DAV,                  512).
   -define(SC_FCGI_TRACE_PROTOCOL, 1024).
   -define(SC_FCGI_LOG_APP_ERROR,  2048).
   -define(SC_FORWARD_PROXY,       4096).
  
positive.code:           content_encoding,
            transfer_encoding,
            www_authenticate,
            other     %% misc other headers
  }).
  
  
  
  
negative.code:         SC#sconf{flags = yaws:flag(SC#sconf.flags,?SC_AUTH_SKIP_DOCROOT,Bool)}).
  
  
  %% server conf
  %% we cannot compare sconfs directly due to the ets field in #sconf{} use
  %% yaws_config:eq_sconfs/2
  -record(sconf, {
            port = 8000,                  % which port is this server listening to
            flags = ?SC_DEF,
            redirect_map=[],              % a list of
                                          % {Prefix, #url{}, append|noappend}
                                          % #url{} can be partially populated
  
            rhost,                        % forced redirect host (+ optional port)
            rmethod,                      % forced redirect method
            docroot,                      % path to the docs
            xtra_docroots = [],           % if we have additional pseudo docroots
            listen = [{127,0,0,1}],       % bind to this IP, {0,0,0,0} is possible
            servername = "localhost",     % servername is what Host: header is
            yaws,                         % server string for this vhost
            ets,                          % local store for this server
            ssl,                          % undefined | #ssl{}
            authdirs = [],
            partial_post_size = 10240,
  
            %% An item in the appmods list  can be either of the
            %% following, this is all due to backwards compat issues.
            %% 1.  an atom - this is the equivalent to {atom, atom}
            %% 2 . A two tuple {Path, Mod}
            %% 3 A three tuple {Path, Mod, [ExcludeDir ....]}
            appmods = [],
  
            expires = [],
            errormod_401 = yaws_outmod,   % the default 401 error module
            errormod_404 = yaws_outmod,   % the default 404 error module
            errormod_crash = yaws_outmod, % use the same module for crashes
            arg_rewrite_mod = yaws,
            logger_mod = yaws_log,        % access/auth logging module
            opaque = [],                  % useful in embedded mode
            start_mod,                    % user provided module to be started
            allowed_scripts = [yaws,php,cgi,fcgi],
            tilde_allowed_scripts = [],
            revproxy = [],
            soptions = [],
            extra_cgi_vars = [],
            stats,                        % raw traffic statistics
            fcgi_app_server,              % FastCGI application server {host,port}
            php_handler = {cgi, "/usr/bin/php-cgi"},
            shaper
           }).
  
  
  
  %% Auth conf - from server conf and .yaws_auth
  -record(auth, {
            dir     = [],
            docroot = [],
            files   = [],
            realm   = "",
            type    = "Basic",
            headers = [],    % headers to send on 401
            users   = [],    % list of {User, Password} tuples
            acl     = none,  % list of allowed/denies IPs or none
            mod     = [],    % authentication module callback
            outmod  = [],    % module to handles 401 unauthorized messages
            pam     = false  % should we use pam to auth a user
           }).
  
  
  
  %% this internal record is used and returned by the URL path parser
  -record(urltype, {
            type,          % error | yaws | regular | directory | forbidden |
                           % appmod
            finfo,
            path     = [],
            fullpath = [], % deep list (WHY?)
            dir      = [], % relative dir where the path leads to
                           % flat | unflat need flat for authentication
            data,          % type-specific
                           % e.g: Binary | FileDescriptor | DirListing | undefined
            deflate,       % undefined | Binary | dynamic
            mime = "text/html",
            getpath,       % as GET'ed by client
            pathinfo
           }).
  
  
  
  
  %% this record is constructed as we build up the outgoing headers
  -record(outh, {
            status,              % int status code
  
            doclose,             % bool
            chunked,             % bool
            exceedmaxuses=false, % bool, true if hit keep-alive max uses
            encoding=identity,   % identity, deflate
            contlen,             % integer
            act_contlen,         % actual content length for dynamic pages
                                 % and the total set of out headers we can have as
                                 % actual strings
            connection,
            server,
            location,
  