You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by mx...@apache.org on 2014/01/28 12:14:33 UTC

svn commit: r1562036 - in /tcl/rivet/branches/modular: ./ ChangeLog configure.ac src/Makefile.am src/apache-2/apache_config.c src/apache-2/apache_config.h src/apache-2/mod_rivet.c

Author: mxmanghi
Date: Tue Jan 28 11:14:33 2014
New Revision: 1562036

URL: http://svn.apache.org/r1562036
Log:
commiting merges from trunk

Added:
    tcl/rivet/branches/modular/src/apache-2/apache_config.c
      - copied unchanged from r1561985, tcl/rivet/trunk/src/apache-2/apache_config.c
    tcl/rivet/branches/modular/src/apache-2/apache_config.h
      - copied unchanged from r1561985, tcl/rivet/trunk/src/apache-2/apache_config.h
Modified:
    tcl/rivet/branches/modular/   (props changed)
    tcl/rivet/branches/modular/ChangeLog
    tcl/rivet/branches/modular/configure.ac
    tcl/rivet/branches/modular/src/Makefile.am
    tcl/rivet/branches/modular/src/apache-2/mod_rivet.c

Propchange: tcl/rivet/branches/modular/
------------------------------------------------------------------------------
  Merged /tcl/rivet/trunk:r1560622-1561985

Modified: tcl/rivet/branches/modular/ChangeLog
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/modular/ChangeLog?rev=1562036&r1=1562035&r2=1562036&view=diff
==============================================================================
--- tcl/rivet/branches/modular/ChangeLog (original)
+++ tcl/rivet/branches/modular/ChangeLog Tue Jan 28 11:14:33 2014
@@ -1,5 +1,10 @@
-2014-01-23 Massimo Manghi <mx...@apache.org>
-    * : merging latest changes from trunk
+2014-01-27 Massimo Manghi <mx...@apache.org>
+    * src/apache-2/apache_config.[c|h]: new file with Apache module configuration
+    procedures moved here from mod_rivet.c. This code is likely to be Apache 2.x
+    but totally independent from the running MPM. Therefore it was moved here
+    to improved size and manageability of mod_rivet.c
+    * src/apache-2/mod_rivet.c: The module central code, from which configuration
+    handling procedures were removed
 
 2014-01-08 Massimo Manghi <mx...@apache.org>
     * rivet/packages/dio/aida.tcl: adding aida.tcl experimental file

Modified: tcl/rivet/branches/modular/configure.ac
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/modular/configure.ac?rev=1562036&r1=1562035&r2=1562036&view=diff
==============================================================================
--- tcl/rivet/branches/modular/configure.ac (original)
+++ tcl/rivet/branches/modular/configure.ac Tue Jan 28 11:14:33 2014
@@ -458,7 +458,7 @@ AC_DEFUN([APACHE_REQUEST],[
         [with_apache_request="request"]
     )
 
-    AC_MSG_CHECKING(for subdir storing code for request handling)
+    AC_MSG_CHECKING(code for request handling)
     apache_request=${with_apache_request}
     AC_SUBST(apache_request)
     AC_MSG_RESULT([$with_apache_request])

Modified: tcl/rivet/branches/modular/src/Makefile.am
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/modular/src/Makefile.am?rev=1562036&r1=1562035&r2=1562036&view=diff
==============================================================================
--- tcl/rivet/branches/modular/src/Makefile.am (original)
+++ tcl/rivet/branches/modular/src/Makefile.am Tue Jan 28 11:14:33 2014
@@ -51,6 +51,7 @@ mod_rivet_la_SOURCES = 			              
                         @apache_request@/apache_request.c			    \
                         @apache_version_dir@/mod_rivet.c 				\
                         @apache_version_dir@/TclWebapache.c 			\
+                        @apache_version_dir@/apache_config.c            \
                         @rivet_core_cmds@/rivetCore.c				    \
                         @rivet_core_cmds@/rivetInspect.c                \
                         channel/rivetChannel.c 			                \

Modified: tcl/rivet/branches/modular/src/apache-2/mod_rivet.c
URL: http://svn.apache.org/viewvc/tcl/rivet/branches/modular/src/apache-2/mod_rivet.c?rev=1562036&r1=1562035&r2=1562036&view=diff
==============================================================================
--- tcl/rivet/branches/modular/src/apache-2/mod_rivet.c (original)
+++ tcl/rivet/branches/modular/src/apache-2/mod_rivet.c Tue Jan 28 11:14:33 2014
@@ -59,6 +59,7 @@
 #include "rivet.h"
 #include "rivetParser.h"
 #include "rivetChannel.h"
+#include "apache_config.h"
 
 #define MODNAME "mod_rivet"
 
@@ -191,6 +192,8 @@ Rivet_CheckType (request_rec *req)
  *          RIVET_DIR   - Rivet's Tcl source directory
  *          RIVET_INIT  - Rivet's init.tcl file
  *          RIVET_VERSION - Rivet version (only when RIVET_DISPLAY_VERSION is 1)
+ *          MPM_THREADED - It should contain the string 'unsupported' for a prefork MPM
+ *          MPM_FORKED - String describing the forking model of the MPM 
  *
  */
 
@@ -664,237 +667,6 @@ Rivet_CleanupRequest( request_rec *r )
 /*
  *-----------------------------------------------------------------------------
  *
- * Rivet_CopyConfig --
- *
- *  Copy the rivet_server_conf struct.
- *
- * Results:
- *  None.
- *
- * Side Effects:
- *  None.
- *
- *-----------------------------------------------------------------------------
- */
-static void
-Rivet_CopyConfig( rivet_server_conf *oldrsc, rivet_server_conf *newrsc )
-{
-    FILEDEBUGINFO;
-
-    newrsc->server_interp = oldrsc->server_interp;
-    newrsc->rivet_global_init_script = oldrsc->rivet_global_init_script;
-    newrsc->rivet_before_script = oldrsc->rivet_before_script;
-    newrsc->rivet_after_script = oldrsc->rivet_after_script;
-    newrsc->rivet_error_script = oldrsc->rivet_error_script;
-    newrsc->rivet_abort_script = oldrsc->rivet_abort_script;
-    newrsc->after_every_script = oldrsc->after_every_script;
-
-    newrsc->user_scripts_updated = oldrsc->user_scripts_updated;
-
-    newrsc->rivet_default_error_script = oldrsc->rivet_default_error_script;
-
-    /* These are pointers so that they can be passed around... */
-    newrsc->cache_size = oldrsc->cache_size;
-    newrsc->cache_free = oldrsc->cache_free;
-    newrsc->upload_max = oldrsc->upload_max;
-    newrsc->upload_files_to_var = oldrsc->upload_files_to_var;
-    newrsc->separate_virtual_interps = oldrsc->separate_virtual_interps;
-    newrsc->honor_header_only_reqs = oldrsc->honor_header_only_reqs;
-    newrsc->server_name = oldrsc->server_name;
-    newrsc->upload_dir = oldrsc->upload_dir;
-    newrsc->rivet_server_vars = oldrsc->rivet_server_vars;
-    newrsc->rivet_dir_vars = oldrsc->rivet_dir_vars;
-    newrsc->rivet_user_vars = oldrsc->rivet_user_vars;
-    newrsc->objCacheList = oldrsc->objCacheList;
-    newrsc->objCache = oldrsc->objCache;
-
-    newrsc->outchannel = oldrsc->outchannel;
-}
-
-/*
- * Merge the per-directory configuration options into a new configuration.
- */
-
-static void
-Rivet_MergeDirConfigVars(apr_pool_t *p, rivet_server_conf *new,
-              rivet_server_conf *base, rivet_server_conf *add )
-{
-    FILEDEBUGINFO;
-    new->rivet_child_init_script = add->rivet_child_init_script ?
-        add->rivet_child_init_script : base->rivet_child_init_script;
-    new->rivet_child_exit_script = add->rivet_child_exit_script ?
-        add->rivet_child_exit_script : base->rivet_child_exit_script;
-
-    new->rivet_before_script = add->rivet_before_script ?
-        add->rivet_before_script : base->rivet_before_script;
-    new->rivet_after_script = add->rivet_after_script ?
-        add->rivet_after_script : base->rivet_after_script;
-    new->rivet_error_script = add->rivet_error_script ?
-        add->rivet_error_script : base->rivet_error_script;
-    new->rivet_abort_script = add->rivet_abort_script ?
-        add->rivet_abort_script : base->rivet_abort_script;
-    new->after_every_script = add->after_every_script ?
-        add->after_every_script : base->after_every_script;
-
-    new->user_scripts_updated = add->user_scripts_updated ?
-        add->user_scripts_updated : base->user_scripts_updated;
-
-    new->upload_dir = add->upload_dir ?
-        add->upload_dir : base->upload_dir;
-
-    /* Merge the tables of dir and user variables. */
-    if (base->rivet_dir_vars && add->rivet_dir_vars) {
-        new->rivet_dir_vars =
-            apr_table_overlay ( p, base->rivet_dir_vars, add->rivet_dir_vars );
-    } else {
-        new->rivet_dir_vars = base->rivet_dir_vars;
-    }
-    if (base->rivet_user_vars && add->rivet_user_vars) {
-        new->rivet_user_vars =
-            apr_table_overlay ( p, base->rivet_user_vars, add->rivet_user_vars );
-    } else {
-        new->rivet_user_vars = base->rivet_user_vars;
-    }
-}
-
-/* Function to get a config and merge the directory/server options  */
-rivet_server_conf *
-Rivet_GetConf( request_rec *r )
-{
-    rivet_server_conf *rsc = RIVET_SERVER_CONF( r->server->module_config );
-    void *dconf = r->per_dir_config;
-    rivet_server_conf *newconfig = NULL;
-    rivet_server_conf *rdc;
-    
-    FILEDEBUGINFO;
-
-    /* If there is no per dir config, just return the server config */
-    if (dconf == NULL) {
-        return rsc;
-    }
-    rdc = RIVET_SERVER_CONF( dconf ); 
-    
-    newconfig = RIVET_NEW_CONF( r->pool );
-
-    Rivet_CopyConfig( rsc, newconfig );
-    Rivet_MergeDirConfigVars( r->pool, newconfig, rsc, rdc );
-
-    return newconfig;
-}
-
-static void *
-Rivet_CreateConfig(apr_pool_t *p, server_rec *s )
-{
-    rivet_server_conf *rsc = RIVET_NEW_CONF(p);
-
-    FILEDEBUGINFO;
-
-    rsc->server_interp          = NULL;
-
-/* scripts obj pointers *must* be initialized to NULL */
-
-    rsc->rivet_server_init_script   = NULL;
-    rsc->rivet_global_init_script   = NULL;
-    rsc->rivet_child_init_script    = NULL;
-    rsc->rivet_child_exit_script    = NULL;
-    rsc->rivet_before_script        = NULL;
-    rsc->rivet_after_script         = NULL;
-    rsc->rivet_error_script         = NULL;
-    rsc->rivet_abort_script         = NULL;
-    rsc->after_every_script         = NULL;
-
-    rsc->user_scripts_updated = 0;
-
-    rsc->rivet_default_error_script = Tcl_NewStringObj("::Rivet::handle_error", -1);
-    Tcl_IncrRefCount(rsc->rivet_default_error_script);
-
-    /* these are pointers so that they can be passed around...  */
-    rsc->cache_size                 = apr_pcalloc(p, sizeof(int));
-    rsc->cache_free                 = apr_pcalloc(p, sizeof(int));
-    *(rsc->cache_size)              = -1;
-    *(rsc->cache_free)              = 0;
-    rsc->upload_max                 = RIVET_MAX_POST;
-    rsc->upload_files_to_var        = RIVET_UPLOAD_FILES_TO_VAR;
-    rsc->separate_virtual_interps   = RIVET_SEPARATE_VIRTUAL_INTERPS;
-    rsc->honor_header_only_reqs     = RIVET_HEAD_REQUESTS;
-    rsc->upload_dir                 = RIVET_UPLOAD_DIR;
-    rsc->server_name                = NULL;
-    rsc->objCacheList               = NULL;
-    rsc->objCache                   = NULL;
-
-    rsc->outchannel                 = NULL;
-
-    rsc->rivet_server_vars          = (apr_table_t *) apr_table_make ( p, 4 );
-    rsc->rivet_dir_vars             = (apr_table_t *) apr_table_make ( p, 4 );
-    rsc->rivet_user_vars            = (apr_table_t *) apr_table_make ( p, 4 );
-
-    return rsc;
-}
-
-#if 0
-
-static void
-Rivet_PropagatePerDirConfArrays( Tcl_Interp *interp, rivet_server_conf *rsc )
-{
-    apr_table_t *t;
-    apr_array_header_t *arr;
-    apr_table_entry_t  *elts;
-    int i, nelts;
-    Tcl_Obj *arrayName;
-    Tcl_Obj *key;
-    Tcl_Obj *val;
-
-    /* Make sure RivetDirConf doesn't exist from a previous request. */
-    Tcl_UnsetVar( interp, "RivetDirConf", TCL_GLOBAL_ONLY );
-
-    /* Propagate all of the DirConf variables into an array. */
-    t = rsc->rivet_dir_vars;
-    arr   = (apr_array_header_t*) apr_table_elts( t );
-    elts  = (apr_table_entry_t *) arr->elts;
-    nelts = arr->nelts;
-    arrayName = Tcl_NewStringObj( "RivetDirConf", -1 );
-    Tcl_IncrRefCount(arrayName);
-
-    for( i = 0; i < nelts; ++i )
-    {
-        key = Tcl_NewStringObj( elts[i].key, -1);
-        val = Tcl_NewStringObj( elts[i].val, -1);
-        Tcl_IncrRefCount(key);
-        Tcl_IncrRefCount(val);
-        Tcl_ObjSetVar2(interp, arrayName, key, val, TCL_GLOBAL_ONLY);
-        Tcl_DecrRefCount(key);
-        Tcl_DecrRefCount(val);
-    }
-    Tcl_DecrRefCount(arrayName);
-
-    /* Make sure RivetUserConf doesn't exist from a previous request. */
-    Tcl_UnsetVar( interp, "RivetUserConf", TCL_GLOBAL_ONLY );
-
-    /* Propagate all of the UserConf variables into an array. */
-    t = rsc->rivet_user_vars;
-    arr   = (apr_array_header_t*) apr_table_elts( t );
-    elts  = (apr_table_entry_t *)arr->elts;
-    nelts = arr->nelts;
-    arrayName = Tcl_NewStringObj( "RivetUserConf", -1 );
-    Tcl_IncrRefCount(arrayName);
-
-    for( i = 0; i < nelts; ++i )
-    {
-        key = Tcl_NewStringObj( elts[i].key, -1);
-        val = Tcl_NewStringObj( elts[i].val, -1);
-        Tcl_IncrRefCount(key);
-        Tcl_IncrRefCount(val);
-        Tcl_ObjSetVar2(interp, arrayName, key, val, TCL_GLOBAL_ONLY);
-        Tcl_DecrRefCount(key);
-        Tcl_DecrRefCount(val);
-    }
-    Tcl_DecrRefCount(arrayName);
-}
-#endif
-
-/*
- *-----------------------------------------------------------------------------
- *
  * Rivet_PerInterpInit --
  *
  *  Do the initialization that needs to happen for every
@@ -1015,254 +787,6 @@ Rivet_PerInterpInit(server_rec *s, rivet
     Tcl_Release(interp);
 }
 
-/*
- *----------------------------------------------------------------------
- *
- * Rivet_AssignStringtoConf --
- *
- *  Assign a string to a Tcl_Obj valued configuration parameter
- *
- * Arguments:
- *
- *  - objPnt: Pointer to a pointer to a Tcl_Obj. If the pointer *objPnt
- *  is NULL (configuration script obj pointers are initialized to NULL)
- *  a new Tcl_Obj is created
- *  - string_value: a string to be assigned to the Tcl_Obj
- *
- * Results:
- *  
- *  - Pointer to a Tcl_Obj containing the parameter value.
- *
- *----------------------------------------------------------------------
- */
-
-static Tcl_Obj* 
-Rivet_AssignStringToConf (Tcl_Obj** objPnt, const char* string_value)
-{
-    Tcl_Obj *objarg = NULL;
-    
-    if (*objPnt == NULL)
-    {
-        objarg = Tcl_NewStringObj(string_value,-1);
-        Tcl_IncrRefCount(objarg);
-        *objPnt = objarg;
-    } else {
-        objarg = *objPnt;
-        Tcl_AppendToObj(objarg, string_value, -1);
-    }
-    Tcl_AppendToObj( objarg, "\n", 1 );
-    return objarg;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * Rivet_SetScript --
- *
- *  Add the text from an apache directive, such as UserConf, to
- *  the corresponding variable in the rivet_server_conf structure.
- *  In most cases, we append the new value to any previously
- *  existing value, but Before, After and Error scripts override
- *  the old directive completely.
- *
- * Results:
- *
- *  Returns a Tcl_Obj* pointing to the string representation of 
- *  the current value for the directive.
- *
- *----------------------------------------------------------------------
- */
-
-
-static const char *
-Rivet_SetScript (apr_pool_t *pool, rivet_server_conf *rsc, const char *script, const char *string)
-{
-    Tcl_Obj *objarg = NULL;
-
-    if( STREQU( script, "GlobalInitScript" ) ) {
-        objarg = Rivet_AssignStringToConf(&(rsc->rivet_global_init_script),string);
-    } else if( STREQU( script, "ChildInitScript" ) ) {
-        objarg = Rivet_AssignStringToConf(&(rsc->rivet_child_init_script),string);
-    } else if( STREQU( script, "ChildExitScript" ) ) {
-        objarg = Rivet_AssignStringToConf(&(rsc->rivet_child_exit_script),string);
-    } else if( STREQU( script, "BeforeScript" ) ) {
-        objarg = Rivet_AssignStringToConf(&(rsc->rivet_before_script),string);
-    } else if( STREQU( script, "AfterScript" ) ) {
-        objarg = Rivet_AssignStringToConf(&(rsc->rivet_after_script),string);
-    } else if( STREQU( script, "ErrorScript" ) ) {
-        objarg = Rivet_AssignStringToConf(&(rsc->rivet_error_script),string);
-    } else if( STREQU( script, "ServerInitScript" ) ) {
-        objarg = Rivet_AssignStringToConf(&(rsc->rivet_server_init_script),string);
-    } else if( STREQU( script, "AbortScript" ) ) {
-        objarg = Rivet_AssignStringToConf(&(rsc->rivet_abort_script),string);
-    } else if( STREQU( script, "AfterEveryScript" ) ) {
-        objarg = Rivet_AssignStringToConf(&(rsc->after_every_script),string);
-    }
-
-    if( !objarg ) return string;
-
-    return Tcl_GetStringFromObj( objarg, NULL );
-}
-
-/*
- * Implements the RivetServerConf Apache Directive
- *
- * Command Arguments:
- *
- *  RivetServerConf ServerInitScript <script>
- *  RivetServerConf GlobalInitScript <script>
- *  RivetServerConf ChildInitScript <script>
- *  RivetServerConf ChildExitScript <script>
- *  RivetServerConf BeforeScript <script>
- *  RivetServerConf AfterScript <script>
- *  RivetServerConf ErrorScript <script>
- *  RivetServerConf AfterEveryScript <script>
- *  RivetServerConf CacheSize <integer>
- *  RivetServerConf UploadDirectory <directory>
- *  RivetServerConf UploadMaxSize <integer>
- *  RivetServerConf UploadFilesToVar <yes|no>
- *  RivetServerConf SeparateVirtualInterps <yes|no>
- *  RivetServerConf HonorHeaderOnlyRequests <yes|no> (2008-06-20: mm)
- */
-
-static const char *
-Rivet_ServerConf( cmd_parms *cmd, void *dummy, 
-                  const char *var, const char *val )
-{
-    server_rec *s = cmd->server;
-    rivet_server_conf *rsc = RIVET_SERVER_CONF(s->module_config);
-    const char *string = val;
-
-    FILEDEBUGINFO;
-
-    if ( var == NULL || val == NULL ) {
-        return "Rivet Error: RivetServerConf requires two arguments";
-    }
-
-    if( STREQU( var, "CacheSize" ) ) {
-        *(rsc->cache_size) = strtol( val, NULL, 10 );
-    } else if( STREQU( var, "UploadDirectory" ) ) {
-        rsc->upload_dir = val;
-    } else if( STREQU( var, "UploadMaxSize" ) ) {
-        rsc->upload_max = strtol( val, NULL, 10 );
-    } else if( STREQU( var, "UploadFilesToVar" ) ) {
-        Tcl_GetBoolean (NULL, val, &rsc->upload_files_to_var);
-    } else if( STREQU( var, "SeparateVirtualInterps" ) ) {
-        Tcl_GetBoolean (NULL, val, &rsc->separate_virtual_interps);
-    } else if( STREQU( var, "HonorHeaderOnlyRequests" ) ) {
-        Tcl_GetBoolean (NULL, val, &rsc->honor_header_only_reqs);
-    } else {
-        string = Rivet_SetScript( cmd->pool, rsc, var, val);
-    }
-
-    if (string != NULL) apr_table_set( rsc->rivet_server_vars, var, string );
-    return( NULL );
-}
-
-/*
- * Implements the RivetDirConf Apache Directive
- *
- * Command Arguments:
- *  RivetDirConf BeforeScript <script>
- *  RivetDirConf AfterScript <script>
- *  RivetDirConf ErrorScript <script>
- *  RivetDirConf AfterEveryScript <script>
- *  RivetDirConf UploadDirectory <directory>
- */
-
-static const char *
-Rivet_DirConf( cmd_parms *cmd, void *vrdc, 
-               const char *var, const char *val )
-{
-    const char *string = val;
-    rivet_server_conf *rdc = (rivet_server_conf *)vrdc;
-
-    FILEDEBUGINFO;
-
-    if ( var == NULL || val == NULL ) {
-        return "Rivet Error: RivetDirConf requires two arguments";
-    }
-
-    if( STREQU( var, "UploadDirectory" ) ) {
-        rdc->upload_dir = val;
-    } else {
-        if (STREQU(var,"BeforeScript")      || 
-            STREQU(var,"AfterScript")       || 
-            STREQU(var,"AbortScript")       ||
-            STREQU(var,"AfterEveryScript")  ||
-            STREQU(var,"ErrorScript"))
-        {
-            string = Rivet_SetScript( cmd->pool, rdc, var, val );
-        }
-        else
-        {
-            return apr_pstrcat(cmd->pool, "Rivet configuration error: '",var, 
-                                          "' not valid for RivetDirConf", NULL);
-        }
-    }
-
-    if (string != NULL) apr_table_set( rdc->rivet_dir_vars, var, string );
-    return NULL;
-}
-
-/*
- * Implements the RivetUserConf Apache Directive
- *
- * Command Arguments:
- *  RivetUserConf BeforeScript <script>
- *  RivetUserConf AfterScript <script>
- *  RivetUserConf ErrorScript <script>
- */
-
-static const char *
-Rivet_UserConf( cmd_parms *cmd, 
-                void *vrdc, 
-                const char *var, 
-                const char *val )
-{
-//  const char *string = val;
-    rivet_server_conf *rdc = (rivet_server_conf *)vrdc;
-
-    FILEDEBUGINFO;
-
-    if ( var == NULL || val == NULL ) {
-        return "Rivet Error: RivetUserConf requires two arguments";
-    }
-
-    /* We have modified these scripts. */
-    /* This is less than ideal though, because it will get set to 1
-     * every time - FIXME. */
-
-    rdc->user_scripts_updated = 1;
-
-    if (STREQU(var,"BeforeScript")      || 
-        STREQU(var,"AfterScript")       || 
-        STREQU(var,"AbortScript")       ||
-        STREQU(var,"AfterEveryScript")  ||
-        STREQU(var,"UploadDirectory")  ||
-        STREQU(var,"ErrorScript"))
-    {
-        apr_table_set( rdc->rivet_user_vars, var, 
-                        Rivet_SetScript( cmd->pool, rdc, var, val));
-    }
-    else if (STREQU(var,"Debug")        ||
-             STREQU(var,"DebugIp")      ||
-             STREQU(var,"DebugSubst")   ||
-             STREQU(var,"DebugSeparator"))
-    {
-        apr_table_set( rdc->rivet_user_vars, var, val);
-    }
-    else
-    {
-        return apr_pstrcat(cmd->pool, "Rivet configuration error: '",var, 
-                                      "' not valid for RivetUserConf", NULL);
-    }
-
-    /* XXX Need to figure out what to do about setting the table.  */
-    // if (string != NULL) apr_table_set( rdc->rivet_user_vars, var, string );
-    return NULL;
-}
-
 static int
 Rivet_InitHandler(apr_pool_t *pPool, apr_pool_t *pLog, apr_pool_t *pTemp,
        server_rec *s)
@@ -1308,122 +832,6 @@ Rivet_InitHandler(apr_pool_t *pPool, apr
 }
 
 
-static void *
-Rivet_CreateDirConfig(apr_pool_t *p, char *dir)
-{
-    rivet_server_conf *rdc = RIVET_NEW_CONF(p);
-
-    FILEDEBUGINFO;
-
-    rdc->rivet_server_vars = (apr_table_t *) apr_table_make ( p, 4 );
-    rdc->rivet_dir_vars = (apr_table_t *) apr_table_make ( p, 4 );
-    rdc->rivet_user_vars = (apr_table_t *) apr_table_make ( p, 4 );
-
-    return rdc;
-}
-
-static void *
-Rivet_MergeDirConfig( apr_pool_t *p, void *basev, void *addv )
-{
-    rivet_server_conf *base = (rivet_server_conf *)basev;
-    rivet_server_conf *add  = (rivet_server_conf *)addv;
-    rivet_server_conf *new  = RIVET_NEW_CONF(p);
-
-    FILEDEBUGINFO;
-
-    Rivet_MergeDirConfigVars( p, new, base, add );
-
-    return new;
-}
-
-/*
- *-----------------------------------------------------------------------------
- *
- * Rivet_MergeConfig --
- *
- *  This function is called when there is a config option set both
- *  at the 'global' level, and for a virtual host.  It "resolves
- *  the conflicts" so to speak, by creating a new configuration,
- *  and this function is where we get to have our say about how to
- *  go about doing that.  For most of the options, we override the
- *  global option with the local one.
- *
- * Results:
- *  Returns a new server configuration.
- *
- * Side Effects:
- *  None.
- *
- *-----------------------------------------------------------------------------
- */
-static void *
-Rivet_MergeConfig(apr_pool_t *p, void *basev, void *overridesv)
-{
-    rivet_server_conf *rsc = RIVET_NEW_CONF(p);
-    rivet_server_conf *base = (rivet_server_conf *) basev;
-    rivet_server_conf *overrides = (rivet_server_conf *) overridesv;
-
-    FILEDEBUGINFO;
-
-    /* For completeness' sake, we list the fate of all the members of
-     * the rivet_server_conf struct. */
-
-    /* server_interp isn't set at this point. */
-    /* rivet_global_init_script is global, not per server. */
-
-    rsc->rivet_child_init_script = overrides->rivet_child_init_script ?
-        overrides->rivet_child_init_script : base->rivet_child_init_script;
-
-    rsc->rivet_child_exit_script = overrides->rivet_child_exit_script ?
-        overrides->rivet_child_exit_script : base->rivet_child_exit_script;
-
-    rsc->rivet_before_script = overrides->rivet_before_script ?
-        overrides->rivet_before_script : base->rivet_before_script;
-
-    rsc->rivet_after_script = overrides->rivet_after_script ?
-        overrides->rivet_after_script : base->rivet_after_script;
-
-    rsc->rivet_error_script = overrides->rivet_error_script ?
-        overrides->rivet_error_script : base->rivet_error_script;
-
-    rsc->rivet_default_error_script = overrides->rivet_default_error_script ?
-        overrides->rivet_default_error_script : base->rivet_default_error_script;
-
-    rsc->rivet_abort_script = overrides->rivet_abort_script ?
-        overrides->rivet_abort_script : base->rivet_abort_script;
-
-    rsc->after_every_script = overrides->after_every_script ?
-        overrides->after_every_script : base->after_every_script;
-
-    /* cache_size is global, and set up later. */
-    /* cache_free is not set up at this point. */
-
-    rsc->upload_max = overrides->upload_max ?
-        overrides->upload_max : base->upload_max;
-
-    rsc->separate_virtual_interps = base->separate_virtual_interps;
-    rsc->honor_header_only_reqs = base->honor_header_only_reqs;
-
-    /* server_name is set up later. */
-
-    rsc->upload_dir = overrides->upload_dir ?
-        overrides->upload_dir : base->upload_dir;
-
-    rsc->rivet_server_vars = overrides->rivet_server_vars ?
-        overrides->rivet_server_vars : base->rivet_server_vars;
-
-    rsc->rivet_dir_vars = overrides->rivet_dir_vars ?
-        overrides->rivet_dir_vars : base->rivet_dir_vars;
-
-    rsc->rivet_user_vars = overrides->rivet_user_vars ?
-        overrides->rivet_user_vars : base->rivet_user_vars;
-
-    /* objCacheList is set up later. */
-    /* objCache is set up later. */
-    /* outchannel is set up later. */
-
-    return rsc;
-}
 
 /*
  *-----------------------------------------------------------------------------
@@ -1901,12 +1309,6 @@ Rivet_SendContent(request_rec *r)
         goto sendcleanup;
     }
 
-#ifdef USE_APACHE_RSC
-//  Rivet_PropagatePerDirConfArrays( interp, rsc );
-#else
-//  Rivet_PropagatePerDirConfArrays( interp, rdc );
-#endif
-
     /* Initialize this the first time through and keep it around. */
     if (request_init == NULL) {
         request_init = Tcl_NewStringObj("::Rivet::initialize_request\n", -1);
@@ -1925,11 +1327,13 @@ Rivet_SendContent(request_rec *r)
     /* Set the script name. */
     {
 #if 1
+    /*
         Tcl_Obj *infoscript = Tcl_NewStringObj("info script ", -1);
         Tcl_IncrRefCount(infoscript);
         Tcl_AppendToObj(infoscript, r->filename, -1);
         Tcl_EvalObjEx(interp, infoscript, TCL_EVAL_DIRECT);
         Tcl_DecrRefCount(infoscript);
+    */
 #else
         /* This speeds things up, but you have to use Tcl internal
          * declerations, which is not so great... */



---------------------------------------------------------------------
To unsubscribe, e-mail: site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: site-cvs-help@tcl.apache.org