Default values of configuration parameters are hard coded in mod_rivet and the
docs don't say for each of them what actually is the default value.
I took up the problem and decided to define preprocessor symbols for them that
could be controlled through 'configure' switch. I preserved the defaults I
found in mod_rivet.c, the difference is they now are written in configure.ac
instead.
I left out of the process the configurable scripts. I think it would be easy to
somehow extend the mechanism for those which are meant to be run at global
level (global init/exit or child init/exit), whereas it's impossible for
scripts that pertain to specific directories or are user defined as they rely
on Apache's internal mechanics.
This setup should allow the build of nearly preconfigured mod_rivet modules and
it might come handy for certain installations.
I wait for objections before committing. Docs will be updated only if the
patches are approved.
-- Massimo
Index: configure.ac
===================================================================
--- configure.ac (revision 1040772)
+++ configure.ac (working copy)
@@ -22,7 +22,7 @@
# so you can encode the package version directly into the source files.
#-----------------------------------------------------------------------
-AC_INIT([Rivet],[2.0.2])
+AC_INIT([Rivet],[2.0.3])
TEA_INIT([3.9])
AC_CONFIG_AUX_DIR(tclconfig)
@@ -428,6 +428,9 @@
AC_MSG_RESULT([$with_rivet_target_dir])
])
+
+# DISPLAY_RIVET_VERSION
+#
# --enable-version-display=[yes|no] (default: no)
# switches on version number display in Apache's signature.
#
@@ -450,6 +453,122 @@
fi
])
+# UPLOAD_DIRECTORY
+#
+# Adds '--with-upload-dir=DIR' to configure's arguments
+#
+# let's make configuration of the upload directory more flexible for windows builds
+# (in case someone steps forward and takes up the Windows port)
+# The upload directory can be changed in the configuration, but we give the
+# user/packager the chance to set a default at compile time.
+# Default: /tmp
+
+AC_DEFUN([UPLOAD_DIRECTORY],[
+ AC_ARG_WITH(
+ upload_dir,
+ [ --with-upload-dir=DIR Default directory for uploads],,
+ with_upload_dir="/tmp"
+ )
+ AC_MSG_CHECKING(where Rivet will save uploads)
+ RIVET_UPLOAD_DIR=${with_upload_dir}
+ AC_SUBST(RIVET_UPLOAD_DIR)
+ AC_MSG_RESULT([$with_upload_dir])
+])
+
+# HONOR_HEAD_REQUESTS (--enable-head-requests)
+# Rivet answers to HEAD requests with a standard response to avoid the whole workload
+# of generating the content of a page with to the sole purpose of returning the HTTP
+# headers.To test the configuration or scripts that manipulate the headers it
+# can be useful to let Rivet honor a HEAD request as if the whole content was
+# generated so that the real headers are returned (this can be set in configuration
+# by adding "RivetServerConf HonorHeaderOnlyRequests yes" to the server configuration)
+# Default: no
+
+AC_DEFUN([HONOR_HEAD_REQUESTS],[
+ AC_ARG_ENABLE(
+ head_requests,
+ [ --enable-head-requests Returns real headers in response to a HEAD request],
+ [ honor_head_requests=$enable_head_requests ],
+ [ honor_head_requests="no"]
+ )
+
+ AC_MSG_CHECKING(whether Rivet has to honor HEAD requests)
+ if test "$honor_head_requests" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(HEAD_REQUESTS,1,[Honor HEAD requests])
+ else
+ AC_MSG_RESULT([no, Rivet will shunt HEAD requests])
+ AC_DEFINE(HEAD_REQUESTS,0,[Honor HEAD requests])
+ fi
+])
+
+# SEPARATE_VIRTUAL_INTERPS (--enable-virtual-interps-separation)
+# Virtual hosts get their own interpreter and configuration. Different
+# applications running on different virtual hosts don't mix up variables
+# and namespaces, avoiding conflicts.
+# Default: no
+
+AC_DEFUN([VIRTUAL_INTERPS_SEPARATION],[
+ AC_ARG_ENABLE(
+ virtual-interps-separation,
+ [ --enable-virtual-interps-separation to turn on virtual host separation],
+ [ separate_virtual_interps=$enable_virtual_interps_separation ],
+ [ separate_virtual_interps="no"]
+ )
+
+ AC_MSG_CHECKING(whether Rivet will crate an interpreter for each virtual host)
+ if test "$separate_virtual_interps" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(SEPARATE_VIRTUAL_INTERPS,1,[virtual hosts will have their own interp])
+ else
+ AC_MSG_RESULT([no])
+ AC_DEFINE(SEPARATE_VIRTUAL_INTERPS,0,[one interpreter per child])
+ fi
+])
+
+# POST_MAX_SIZE (--with-post-max)
+# Maximum size of data posted by a form
+# Default: 0=unlimited
+
+AC_DEFUN([POST_MAX_SIZE],[
+ AC_ARG_WITH(
+ post_max,
+ [ --with-post-max=BYTES Maximum size of data to be sent with a POST],,
+ with_post_max=0
+ )
+
+ AC_MSG_CHECKING(maximum size of a POST)
+ MAX_POST=${with_post_max}
+ AC_SUBST(MAX_POST)
+ if test $with_post_max = 0; then
+ AC_MSG_RESULT([unlimited size])
+ else
+ AC_MSG_RESULT([$with_post_max])
+ fi
+])
+
+# UPLOAD_TO_VAR (--enable-upload-var)
+# Enables upload of files into Tcl variables
+# Default: 1=enabled
+
+AC_DEFUN([UPLOAD_TO_VAR],[
+ AC_ARG_ENABLE(
+ upload-var,
+ [ --enable-upload-var to enable automatic upload to variables ],
+ [ upload_var=$enable_upload_var ],
+ [ upload_var="yes"]
+ )
+
+ AC_MSG_CHECKING(if files are uploaded to Tcl variables)
+ if test "$upload_var" = "yes"; then
+ AC_MSG_RESULT([yes])
+ AC_DEFINE(UPLOAD_FILES_TO_VAR,1,[Files are uploaded to Tcl variables])
+ else
+ AC_MSG_RESULT([no])
+ AC_DEFINE(UPLOAD_FILES_TO_VAR,0,[uploads go to files])
+ fi
+
+])
APACHE_VERSION
GET_RIVET_BASE
APACHE
@@ -458,10 +577,17 @@
APR_HANDLING
RIVET_TCL_LIB
DISPLAY_RIVET_VERSION
+UPLOAD_DIRECTORY
+HONOR_HEAD_REQUESTS
+VIRTUAL_INTERPS_SEPARATION
+POST_MAX_SIZE
+UPLOAD_TO_VAR
AC_SUBST(apache_version_dir)
AC_DEFINE_UNQUOTED(RIVETLIB_DESTDIR,"${RIVET_TCL_TARGET}",[The path to the rivet tcl library])
AC_DEFINE_UNQUOTED(NAMEOFEXECUTABLE,"${TCLSH_PROG}",[The path to a working tclsh executable])
+AC_DEFINE_UNQUOTED(UPLOAD_DIR,"${RIVET_UPLOAD_DIR}",[Path to the disk directory where uploads are saved])
+AC_DEFINE_UNQUOTED(MAX_POST,"${MAX_POST}",[Max size of data in POST operations])
# We need to use the package path for the installation procedure. On
#Debian linux TCL_PACKAGE_PATH may have more than one path in the
Index: src/apache-2/mod_rivet.c
===================================================================
--- src/apache-2/mod_rivet.c (revision 1040772)
+++ src/apache-2/mod_rivet.c (working copy)
@@ -72,8 +72,8 @@
#define TCL_FILE 2
/* rivet return codes */
-#define RIVET_OK 0
-#define RIVET_ERROR 1
+#define RIVET_OK 0
+#define RIVET_ERROR 1
TCL_DECLARE_MUTEX(sendMutex);
@@ -81,13 +81,13 @@
#define TCL_FILE_CTYPE "application/x-rivet-tcl"
/* This snippet of code came from the mod_ruby project, which is under a BSD license. */
-
+
static int Rivet_chdir_file (const char *file)
{
const char *x;
int chdir_retval = 0;
+ char chdir_buf[HUGE_STRING_LEN];
- char chdir_buf[HUGE_STRING_LEN];
x = strrchr(file, '/');
if (x == NULL) {
chdir_retval = chdir(file);
@@ -125,14 +125,15 @@
int ctype = CTYPE_NOT_HANDLED;
if ( req->content_type != NULL ) {
- if( STRNEQU( req->content_type, RIVET_FILE_CTYPE) ) {
- ctype = RIVET_FILE;
- } else if( STRNEQU( req->content_type, TCL_FILE_CTYPE) ) {
- ctype = TCL_FILE;
- }
+ if( STRNEQU( req->content_type, RIVET_FILE_CTYPE) ) {
+ ctype = RIVET_FILE;
+ } else if( STRNEQU( req->content_type, TCL_FILE_CTYPE) ) {
+ ctype = TCL_FILE;
+ }
}
return ctype;
}
+
/*
* Rivet_ParseFileArgString (char *szDocRoot, char *szArgs, char **file)
*
@@ -221,6 +222,7 @@
* RIVET_DIR - Rivet's Tcl source directory
* RIVET_INIT - Rivet's init.tcl file
*/
+
static void
Rivet_InitServerVariables( Tcl_Interp *interp, apr_pool_t *p )
{
@@ -355,7 +357,8 @@
/* If we don't have an error script, use the default error handler. */
if (conf->rivet_error_script ) {
- errscript = Tcl_NewStringObj(conf->rivet_error_script, -1);
+// errscript = Tcl_NewStringObj(conf->rivet_error_script, -1);
+ errscript = conf->rivet_error_script;
} else {
errscript = conf->rivet_default_error_script;
}
@@ -363,8 +366,7 @@
Tcl_IncrRefCount(errscript);
if (Tcl_EvalObjEx(interp, errscript, 0) == TCL_ERROR) {
CONST84 char *errorinfo = Tcl_GetVar( interp, "errorInfo", 0 );
- TclWeb_PrintError("<b>Rivet ErrorScript failed!</b>", 1,
- globals->req);
+ TclWeb_PrintError("<b>Rivet ErrorScript failed!</b>",1,globals->req);
TclWeb_PrintError( errorinfo, 0, globals->req );
}
@@ -377,7 +379,7 @@
good:
if (!globals->req->headers_set && (globals->req->charset != NULL)) {
- TclWeb_SetHeaderType (apr_pstrcat(globals->req->req->pool,"text/html;",globals->req->charset,NULL),globals->req);
+ TclWeb_SetHeaderType (apr_pstrcat(globals->req->req->pool,"text/html;",globals->req->charset,NULL),globals->req);
}
TclWeb_PrintHeaders(globals->req);
Tcl_Flush(*(conf->outchannel));
@@ -469,15 +471,13 @@
/* We don't have a compiled version. Let's create one. */
if (isNew || *(rsc->cache_size) == 0)
{
- //char *hkCopy;
-
outbuf = Tcl_NewObj();
Tcl_IncrRefCount(outbuf);
if (toplevel) {
if (rsc->rivet_before_script) {
- Tcl_AppendObjToObj(outbuf,
- Tcl_NewStringObj(rsc->rivet_before_script, -1));
+ Tcl_AppendObjToObj(outbuf,rsc->rivet_before_script);
+// Tcl_NewStringObj(rsc->rivet_before_script, -1));
}
}
@@ -504,7 +504,8 @@
}
if (toplevel) {
if (rsc->rivet_after_script) {
- Tcl_AppendObjToObj(outbuf,Tcl_NewStringObj(rsc->rivet_after_script, -1));
+// Tcl_AppendObjToObj(outbuf,Tcl_NewStringObj(rsc->rivet_after_script, -1));
+ Tcl_AppendObjToObj(outbuf,rsc->rivet_after_script);
}
}
@@ -655,6 +656,7 @@
/*
* 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 )
@@ -709,7 +711,6 @@
newconfig = RIVET_NEW_CONF( r->pool );
Rivet_CopyConfig( rsc, newconfig );
-
Rivet_MergeDirConfigVars( r->pool, newconfig, rsc, rdc );
return newconfig;
@@ -722,14 +723,17 @@
FILEDEBUGINFO;
- rsc->server_interp = 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->server_interp = NULL;
+/* scripts obj pointers *must* be initialized to 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->user_scripts_updated = 0;
rsc->rivet_default_error_script = Tcl_NewStringObj("::Rivet::handle_error", -1);
@@ -738,18 +742,18 @@
/* 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 = 0;
- rsc->upload_files_to_var = 1;
- rsc->separate_virtual_interps = 0;
- rsc->honor_header_only_reqs = 0;
- rsc->server_name = NULL;
- rsc->upload_dir = "/tmp";
- rsc->objCacheList = NULL;
- rsc->objCache = NULL;
+ *(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->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 );
@@ -775,7 +779,7 @@
/* 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;
+ elts = (apr_table_entry_t *) arr->elts;
nelts = arr->nelts;
arrayName = Tcl_NewStringObj( "RivetDirConf", -1 );
Tcl_IncrRefCount(arrayName);
@@ -837,6 +841,8 @@
{
Tcl_Interp *interp = rsc->server_interp;
rivet_interp_globals *globals = NULL;
+ Tcl_Obj* auto_path = NULL;
+ Tcl_Obj* rivet_tcl = NULL;
ap_assert (interp != (Tcl_Interp *)NULL);
Tcl_Preserve (interp);
@@ -858,25 +864,30 @@
globals = apr_pcalloc(p, sizeof(rivet_interp_globals));
Tcl_SetAssocData(interp, "rivet", NULL, globals);
- /* Eval Rivet's init.tcl file to load in the Tcl-level
- commands. */
+ /* Eval Rivet's init.tcl file to load in the Tcl-level commands. */
- /* We call Tcl_EvalFile on init.tcl. This call sets up
- * some variables and adds RIVETLIB_DESTDIR to auto_path.
- *
- * This is the old call for setting up the tcl environment.
- *
- * if (Tcl_PkgRequire(interp, "RivetTcl", "1.1", 1) == NULL)
- *
- * We may revert to it if we can devise a mechanism that
- * links a specific installation to RivetTcl's version
+ /* We put in front the auto_path list the path to the directory where
+ * init.tcl is located (provides package RivetTcl)
*/
- if (Tcl_EvalFile(interp,RIVET_RIVETLIB_DESTDIR"/init.tcl") == TCL_ERROR) {
+
+ auto_path = Tcl_GetVar2Ex(interp,"auto_path",NULL,TCL_GLOBAL_ONLY);
+
+ rivet_tcl = Tcl_NewStringObj(RIVET_DIR,-1);
+ Tcl_IncrRefCount(rivet_tcl);
+ if (Tcl_ListObjReplace(interp,auto_path,0,0,1,&rivet_tcl) == TCL_ERROR)
+ {
+ ap_log_error( APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
+ "error setting auto_path: %s",Tcl_GetStringFromObj(auto_path,NULL));
+ }
+ Tcl_DecrRefCount(rivet_tcl);
+
+ if (Tcl_PkgRequire(interp, "RivetTcl", "1.1", 1) == NULL)
+ {
ap_log_error( APLOG_MARK, APLOG_ERR, APR_EGENERAL, s,
"init.tcl must be installed correctly for Apache Rivet to function: %s",
Tcl_GetStringResult(interp) );
exit(1);
- }
+ }
/* Set the output buffer size to the largest allowed value, so that we
* won't send any result packets to the browser unless the Rivet
@@ -888,7 +899,45 @@
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;
+}
+
/*
*----------------------------------------------------------------------
*
@@ -902,57 +951,31 @@
*
* Results:
*
- * Returns the string representation of the current value for the
- * directive.
+ * 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)
+Rivet_SetScript (apr_pool_t *pool, rivet_server_conf *rsc,
+ const char *script, const char *string)
{
Tcl_Obj *objarg = NULL;
if( STREQU( script, "GlobalInitScript" ) ) {
- if( rsc->rivet_global_init_script == NULL ) {
- objarg = Tcl_NewStringObj( string, -1 );
- Tcl_IncrRefCount( objarg );
- Tcl_AppendToObj( objarg, "\n", 1 );
- rsc->rivet_global_init_script = objarg;
- } else {
- objarg = rsc->rivet_global_init_script;
- Tcl_AppendToObj( objarg, string, -1 );
- Tcl_AppendToObj( objarg, "\n", 1 );
- }
+ objarg = Rivet_AssignStringToConf(&(rsc->rivet_global_init_script),string);
} else if( STREQU( script, "ChildInitScript" ) ) {
- if( rsc->rivet_child_init_script == NULL ) {
- objarg = Tcl_NewStringObj( string, -1 );
- Tcl_IncrRefCount( objarg );
- Tcl_AppendToObj( objarg, "\n", 1 );
- rsc->rivet_child_init_script = objarg;
- } else {
- objarg = rsc->rivet_child_init_script;
- Tcl_AppendToObj( objarg, string, -1 );
- Tcl_AppendToObj( objarg, "\n", 1 );
- }
+ objarg = Rivet_AssignStringToConf(&(rsc->rivet_child_init_script),string);
} else if( STREQU( script, "ChildExitScript" ) ) {
- if( rsc->rivet_child_exit_script == NULL ) {
- objarg = Tcl_NewStringObj( string, -1 );
- Tcl_IncrRefCount( objarg );
- Tcl_AppendToObj( objarg, "\n", 1 );
- rsc->rivet_child_exit_script = objarg;
- } else {
- objarg = rsc->rivet_child_exit_script;
- Tcl_AppendToObj( objarg, string, -1 );
- Tcl_AppendToObj( objarg, "\n", 1 );
- }
+ objarg = Rivet_AssignStringToConf(&(rsc->rivet_child_exit_script),string);
} else if( STREQU( script, "BeforeScript" ) ) {
- rsc->rivet_before_script = apr_pstrcat(pool, string, "\n", NULL);
+ objarg = Rivet_AssignStringToConf(&(rsc->rivet_before_script),string);
} else if( STREQU( script, "AfterScript" ) ) {
- rsc->rivet_after_script = apr_pstrcat(pool, string, "\n", NULL);
+ objarg = Rivet_AssignStringToConf(&(rsc->rivet_after_script),string);
} else if( STREQU( script, "ErrorScript" ) ) {
- rsc->rivet_error_script = apr_pstrcat(pool, string, "\n", NULL);
+ objarg = Rivet_AssignStringToConf(&(rsc->rivet_error_script),string);
}
if( !objarg ) return string;
@@ -1008,7 +1031,7 @@
string = Rivet_SetScript( cmd->pool, rsc, var, val);
}
- apr_table_set( rsc->rivet_server_vars, var, string );
+ if (string != NULL) apr_table_set( rsc->rivet_server_vars, var, string );
return( NULL );
}
@@ -1020,7 +1043,8 @@
* RivetDirConf AfterScript <script>
* RivetDirConf ErrorScript <script>
* RivetDirConf UploadDirectory <directory>
-*/
+ */
+
static const char *
Rivet_DirConf( cmd_parms *cmd, void *vrdc,
const char *var, const char *val )
@@ -1040,7 +1064,7 @@
string = Rivet_SetScript( cmd->pool, rdc, var, val );
}
- apr_table_set( rdc->rivet_dir_vars, var, string );
+ if (string != NULL) apr_table_set( rdc->rivet_dir_vars, var, string );
return NULL;
}
@@ -1051,7 +1075,8 @@
* RivetUserConf BeforeScript <script>
* RivetUserConf AfterScript <script>
* RivetUserConf ErrorScript <script>
-*/
+ */
+
static const char *
Rivet_UserConf( cmd_parms *cmd, void *vrdc,
const char *var,
@@ -1065,6 +1090,7 @@
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. */
@@ -1072,7 +1098,7 @@
string = Rivet_SetScript( cmd->pool, rdc, var, val );
/* XXX Need to figure out what to do about setting the table. */
- apr_table_set( rdc->rivet_user_vars, var, string );
+ if (string != NULL) apr_table_set( rdc->rivet_user_vars, var, string );
return NULL;
}
@@ -1310,17 +1336,18 @@
Tcl_GetVar(rsc->server_interp, "errorInfo", 0));
}
Tcl_Release (rsc->server_interp);
-
}
}
if (!init) {
+
/*
* Upon child exit we delete the master interpreter before the
* caller invokes Tcl_Finalize. Even if we're running separate
* virtual interpreters, we don't delete the slaves
- * as deleting the master implicitly deltes its slave interpreters.
+ * as deleting the master implicitly deletes its slave interpreters.
*/
+
rsc = RIVET_SERVER_CONF(s->module_config);
if (!Tcl_InterpDeleted (rsc->server_interp)) {
Tcl_DeleteInterp(rsc->server_interp);
@@ -1353,7 +1380,6 @@
return OK;
}
-
/*
*-----------------------------------------------------------------------------
*
@@ -1410,6 +1436,7 @@
* If the cache size is 0, the user has requested not to cache
* documents.
*/
+
if(*(rsc->cache_size) < 0) {
if (ap_max_requests_per_child != 0) {
*(rsc->cache_size) = ap_max_requests_per_child / 5;
@@ -1441,9 +1468,11 @@
for (sr = s; sr; sr = sr->next)
{
myrsc = RIVET_SERVER_CONF(sr->module_config);
+
/* We only have a different rivet_server_conf if MergeConfig
* was called. We really need a separate one for each server,
* so we go ahead and create one here, if necessary. */
+
if (sr != s && myrsc == rsc) {
myrsc = RIVET_NEW_CONF(p);
ap_set_module_config(sr->module_config, &rivet_module, myrsc);
@@ -1660,7 +1689,7 @@
TclWeb_PrintHeaders(globals->req);
retval = OK;
goto sendcleanup;
- }
+ }
/*
* if we are handling the request we also want to check if a charset
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]