httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chr...@apache.org
Subject svn commit: r755634 [4/6] - in /httpd/mod_fcgid/trunk/mod_fcgid: ./ arch/unix/ arch/win32/
Date Wed, 18 Mar 2009 16:37:32 GMT
Modified: httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c?rev=755634&r1=755633&r2=755634&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c (original)
+++ httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c Wed Mar 18 16:37:31 2009
@@ -47,819 +47,819 @@
 #define DEFAULT_IPC_COMM_TIMEOUT 40
 #define DEFAULT_OUTPUT_BUFFERSIZE 65536
 #define DEFAULT_MAX_REQUESTS_PER_PROCESS -1
-#define DEFAULT_MAX_REQUEST_LEN (1024*1024*1024)	/* 1G */
-#define DEFAULT_MAX_MEM_REQUEST_LEN (1024*64)	/* 64k */
+#define DEFAULT_MAX_REQUEST_LEN (1024*1024*1024)    /* 1G */
+#define DEFAULT_MAX_MEM_REQUEST_LEN (1024*64)   /* 64k */
 
 static void init_server_config(apr_pool_t * p, fcgid_server_conf * config)
 {
-	config->default_init_env = NULL;
-	config->pass_headers = NULL;
-	config->sockname_prefix =
-		ap_server_root_relative(p, DEFAULT_SOCKET_PREFIX);
-	config->shmname_path = ap_server_root_relative(p, DEFAULT_SHM_PATH);
-	config->idle_timeout = DEFAULT_IDLE_TIMEOUT;
-	config->idle_scan_interval = DEFAULT_IDLE_SCAN_INTERVAL;
-	config->busy_scan_interval = DEFAULT_BUSY_SCAN_INTERVAL;
-	config->proc_lifetime = DEFAULT_PROC_LIFETIME;
-	config->error_scan_interval = DEFAULT_ERROR_SCAN_INTERVAL;
-	config->zombie_scan_interval = DEFAULT_ZOMBIE_SCAN_INTERVAL;
-	config->spawn_score = DEFAULT_SPAWN_SCORE;
-	config->spawnscore_uplimit = DEFAULT_SPAWNSOCRE_UPLIMIT;
-	config->termination_score = DEFAULT_TERMINATION_SCORE;
-	config->time_score = DEFAULT_TIME_SCORE;
-	config->max_class_process_count = DEFAULT_MAX_CLASS_PROCESS_COUNT;
-	config->min_class_process_count = DEFAULT_MIN_CLASS_PROCESS_COUNT;
-	config->max_process_count = DEFAULT_MAX_PROCESS_COUNT;
-	config->output_buffersize = DEFAULT_OUTPUT_BUFFERSIZE;
-	config->ipc_comm_timeout = DEFAULT_IPC_COMM_TIMEOUT;
-	config->ipc_connect_timeout = DEFAULT_IPC_CONNECT_TIMEOUT;
-	config->busy_timeout = DEFAULT_BUSY_TIMEOUT;
-	config->php_fix_pathinfo_enable = 0;
-	config->max_requests_per_process = DEFAULT_MAX_REQUESTS_PER_PROCESS;
-	config->max_request_len = DEFAULT_MAX_REQUEST_LEN;
-	config->max_mem_request_len = DEFAULT_MAX_MEM_REQUEST_LEN;
+    config->default_init_env = NULL;
+    config->pass_headers = NULL;
+    config->sockname_prefix =
+        ap_server_root_relative(p, DEFAULT_SOCKET_PREFIX);
+    config->shmname_path = ap_server_root_relative(p, DEFAULT_SHM_PATH);
+    config->idle_timeout = DEFAULT_IDLE_TIMEOUT;
+    config->idle_scan_interval = DEFAULT_IDLE_SCAN_INTERVAL;
+    config->busy_scan_interval = DEFAULT_BUSY_SCAN_INTERVAL;
+    config->proc_lifetime = DEFAULT_PROC_LIFETIME;
+    config->error_scan_interval = DEFAULT_ERROR_SCAN_INTERVAL;
+    config->zombie_scan_interval = DEFAULT_ZOMBIE_SCAN_INTERVAL;
+    config->spawn_score = DEFAULT_SPAWN_SCORE;
+    config->spawnscore_uplimit = DEFAULT_SPAWNSOCRE_UPLIMIT;
+    config->termination_score = DEFAULT_TERMINATION_SCORE;
+    config->time_score = DEFAULT_TIME_SCORE;
+    config->max_class_process_count = DEFAULT_MAX_CLASS_PROCESS_COUNT;
+    config->min_class_process_count = DEFAULT_MIN_CLASS_PROCESS_COUNT;
+    config->max_process_count = DEFAULT_MAX_PROCESS_COUNT;
+    config->output_buffersize = DEFAULT_OUTPUT_BUFFERSIZE;
+    config->ipc_comm_timeout = DEFAULT_IPC_COMM_TIMEOUT;
+    config->ipc_connect_timeout = DEFAULT_IPC_CONNECT_TIMEOUT;
+    config->busy_timeout = DEFAULT_BUSY_TIMEOUT;
+    config->php_fix_pathinfo_enable = 0;
+    config->max_requests_per_process = DEFAULT_MAX_REQUESTS_PER_PROCESS;
+    config->max_request_len = DEFAULT_MAX_REQUEST_LEN;
+    config->max_mem_request_len = DEFAULT_MAX_MEM_REQUEST_LEN;
 }
 
 void *create_fcgid_server_config(apr_pool_t * p, server_rec * s)
 {
-	fcgid_server_conf *config = apr_pcalloc(p, sizeof(*config));
+    fcgid_server_conf *config = apr_pcalloc(p, sizeof(*config));
 
-	init_server_config(p, config);
-	return config;
+    init_server_config(p, config);
+    return config;
 }
 
 void *merge_fcgid_server_config(apr_pool_t * p, void *basev, void *locv)
 {
-	int i;
-	fcgid_server_conf *merged_config =
-		(fcgid_server_conf *) apr_pcalloc(p, sizeof(fcgid_server_conf));
-	fcgid_server_conf *base = (fcgid_server_conf *) basev;
-	fcgid_server_conf *local = (fcgid_server_conf *) locv;
-	const apr_array_header_t *baseenv_array, *locenv_array;
-
-	init_server_config(p, merged_config);
-
-	/* Merge environment variables */
-	baseenv_array = apr_table_elts(base->default_init_env);
-	locenv_array = apr_table_elts(local->default_init_env);
-
-	if (baseenv_array != NULL || locenv_array != NULL) {
-		merged_config->default_init_env = apr_table_make(p, 20);
-
-		if (locenv_array != NULL) {
-			const apr_table_entry_t *locenv_entry =
-				(apr_table_entry_t *) locenv_array->elts;
-
-			for (i = 0; i < locenv_array->nelts; ++i) {
-				apr_table_set(merged_config->default_init_env,
-							  locenv_entry[i].key, locenv_entry[i].val);
-			}
-		}
-
-		if (baseenv_array != NULL) {
-			const apr_table_entry_t *baseenv_entry =
-				(apr_table_entry_t *) baseenv_array->elts;
-
-			for (i = 0; i < baseenv_array->nelts; ++i) {
-				if (apr_table_get
-					(merged_config->default_init_env,
-					 baseenv_entry[i].key))
-					continue;
-				apr_table_set(merged_config->default_init_env,
-							  baseenv_entry[i].key, baseenv_entry[i].val);
-			}
-		}
-	}
-
-	/* Merge pass headers */
-	if (local->pass_headers != NULL || base->pass_headers != NULL) {
-		merged_config->pass_headers =
-			apr_array_make(p, 10, sizeof(const char *));
-		if (base->pass_headers != NULL)
-			apr_array_cat(merged_config->pass_headers, base->pass_headers);
-		if (local->pass_headers != NULL)
-			apr_array_cat(merged_config->pass_headers,
-						  local->pass_headers);
-	}
-	// Merge the other configurations
-	merged_config->ipc_comm_timeout = base->ipc_comm_timeout;
-	merged_config->ipc_comm_timeout = local->ipc_comm_timeout;
+    int i;
+    fcgid_server_conf *merged_config =
+        (fcgid_server_conf *) apr_pcalloc(p, sizeof(fcgid_server_conf));
+    fcgid_server_conf *base = (fcgid_server_conf *) basev;
+    fcgid_server_conf *local = (fcgid_server_conf *) locv;
+    const apr_array_header_t *baseenv_array, *locenv_array;
+
+    init_server_config(p, merged_config);
+
+    /* Merge environment variables */
+    baseenv_array = apr_table_elts(base->default_init_env);
+    locenv_array = apr_table_elts(local->default_init_env);
+
+    if (baseenv_array != NULL || locenv_array != NULL) {
+        merged_config->default_init_env = apr_table_make(p, 20);
+
+        if (locenv_array != NULL) {
+            const apr_table_entry_t *locenv_entry =
+                (apr_table_entry_t *) locenv_array->elts;
+
+            for (i = 0; i < locenv_array->nelts; ++i) {
+                apr_table_set(merged_config->default_init_env,
+                              locenv_entry[i].key, locenv_entry[i].val);
+            }
+        }
+
+        if (baseenv_array != NULL) {
+            const apr_table_entry_t *baseenv_entry =
+                (apr_table_entry_t *) baseenv_array->elts;
+
+            for (i = 0; i < baseenv_array->nelts; ++i) {
+                if (apr_table_get
+                    (merged_config->default_init_env,
+                     baseenv_entry[i].key))
+                    continue;
+                apr_table_set(merged_config->default_init_env,
+                              baseenv_entry[i].key, baseenv_entry[i].val);
+            }
+        }
+    }
+
+    /* Merge pass headers */
+    if (local->pass_headers != NULL || base->pass_headers != NULL) {
+        merged_config->pass_headers =
+            apr_array_make(p, 10, sizeof(const char *));
+        if (base->pass_headers != NULL)
+            apr_array_cat(merged_config->pass_headers, base->pass_headers);
+        if (local->pass_headers != NULL)
+            apr_array_cat(merged_config->pass_headers,
+                          local->pass_headers);
+    }
+    // Merge the other configurations
+    merged_config->ipc_comm_timeout = base->ipc_comm_timeout;
+    merged_config->ipc_comm_timeout = local->ipc_comm_timeout;
 
-	merged_config->ipc_connect_timeout = base->ipc_connect_timeout;
-	merged_config->ipc_connect_timeout = local->ipc_connect_timeout;
+    merged_config->ipc_connect_timeout = base->ipc_connect_timeout;
+    merged_config->ipc_connect_timeout = local->ipc_connect_timeout;
 
-	merged_config->busy_timeout = base->busy_timeout;
-	merged_config->busy_timeout = local->busy_timeout;
+    merged_config->busy_timeout = base->busy_timeout;
+    merged_config->busy_timeout = local->busy_timeout;
 
-	return merged_config;
+    return merged_config;
 }
 
 void *create_fcgid_dir_config(apr_pool_t * p, char *dummy)
 {
-	fcgid_dir_conf *config = apr_pcalloc(p, sizeof(fcgid_dir_conf));
+    fcgid_dir_conf *config = apr_pcalloc(p, sizeof(fcgid_dir_conf));
 
-	config->wrapper_info_hash = apr_hash_make(p);
-	config->authenticator_info = NULL;
-	config->authenticator_authoritative = 1;
-	config->authorizer_info = NULL;
-	config->authorizer_authoritative = 1;
-	config->access_info = NULL;
-	config->access_authoritative = 1;
-	return (void *) config;
+    config->wrapper_info_hash = apr_hash_make(p);
+    config->authenticator_info = NULL;
+    config->authenticator_authoritative = 1;
+    config->authorizer_info = NULL;
+    config->authorizer_authoritative = 1;
+    config->access_info = NULL;
+    config->access_authoritative = 1;
+    return (void *) config;
 }
 
 const char *set_idle_timeout(cmd_parms * cmd, void *dummy, const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->idle_timeout = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->idle_timeout = atol(arg);
+    return NULL;
 }
 
 int get_idle_timeout(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->idle_timeout : DEFAULT_IDLE_TIMEOUT;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->idle_timeout : DEFAULT_IDLE_TIMEOUT;
 }
 
 const char *set_idle_scan_interval(cmd_parms * cmd, void *dummy,
-								   const char *arg)
+                                   const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->idle_scan_interval = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->idle_scan_interval = atol(arg);
+    return NULL;
 }
 
 int get_idle_scan_interval(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->idle_scan_interval : DEFAULT_IDLE_TIMEOUT;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->idle_scan_interval : DEFAULT_IDLE_TIMEOUT;
 }
 
 const char *set_busy_timeout(cmd_parms * cmd, void *dummy, const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->busy_timeout = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->busy_timeout = atol(arg);
+    return NULL;
 }
 
 int get_busy_timeout(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->busy_timeout : DEFAULT_BUSY_TIMEOUT;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->busy_timeout : DEFAULT_BUSY_TIMEOUT;
 }
 
 const char *set_busy_scan_interval(cmd_parms * cmd, void *dummy,
-								   const char *arg)
+                                   const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->busy_scan_interval = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->busy_scan_interval = atol(arg);
+    return NULL;
 }
 
 int get_busy_scan_interval(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->
-		busy_scan_interval : DEFAULT_BUSY_SCAN_INTERVAL;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->
+        busy_scan_interval : DEFAULT_BUSY_SCAN_INTERVAL;
 }
 
 const char *set_proc_lifetime(cmd_parms * cmd, void *dummy,
-							  const char *arg)
+                              const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->proc_lifetime = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->proc_lifetime = atol(arg);
+    return NULL;
 }
 
 int get_proc_lifetime(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->proc_lifetime : DEFAULT_PROC_LIFETIME;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->proc_lifetime : DEFAULT_PROC_LIFETIME;
 }
 
 const char *set_error_scan_interval(cmd_parms * cmd, void *dummy,
-									const char *arg)
+                                    const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->error_scan_interval = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->error_scan_interval = atol(arg);
+    return NULL;
 }
 
 int get_error_scan_interval(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->
-		error_scan_interval : DEFAULT_ERROR_SCAN_INTERVAL;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->
+        error_scan_interval : DEFAULT_ERROR_SCAN_INTERVAL;
 }
 
 const char *set_zombie_scan_interval(cmd_parms * cmd, void *dummy,
-									 const char *arg)
+                                     const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->zombie_scan_interval = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->zombie_scan_interval = atol(arg);
+    return NULL;
 }
 
 int get_zombie_scan_interval(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->
-		zombie_scan_interval : DEFAULT_ZOMBIE_SCAN_INTERVAL;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->
+        zombie_scan_interval : DEFAULT_ZOMBIE_SCAN_INTERVAL;
 }
 
 const char *set_socketpath(cmd_parms * cmd, void *dummy, const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->sockname_prefix = ap_server_root_relative(cmd->pool, arg);
-	if (!config->sockname_prefix)
-		return "Invalid socket path";
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->sockname_prefix = ap_server_root_relative(cmd->pool, arg);
+    if (!config->sockname_prefix)
+        return "Invalid socket path";
 
-	return NULL;
+    return NULL;
 }
 
 const char *get_socketpath(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config->sockname_prefix;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config->sockname_prefix;
 }
 
 const char *set_shmpath(cmd_parms * cmd, void *dummy, const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->shmname_path = ap_server_root_relative(cmd->pool, arg);
-	if (!config->shmname_path)
-		return "Invalid shmname path";
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->shmname_path = ap_server_root_relative(cmd->pool, arg);
+    if (!config->shmname_path)
+        return "Invalid shmname path";
 
-	return NULL;
+    return NULL;
 }
 
 const char *get_shmpath(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config->shmname_path;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config->shmname_path;
 }
 
 const char *set_spawnscore_uplimit(cmd_parms * cmd, void *dummy,
-								   const char *arg)
+                                   const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->spawnscore_uplimit = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->spawnscore_uplimit = atol(arg);
+    return NULL;
 }
 
 int get_spawnscore_uplimit(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->
-		spawnscore_uplimit : DEFAULT_SPAWNSOCRE_UPLIMIT;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->
+        spawnscore_uplimit : DEFAULT_SPAWNSOCRE_UPLIMIT;
 }
 
 const char *set_max_request_len(cmd_parms * cmd, void *dummy,
-								const char *arg)
+                                const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->max_request_len = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->max_request_len = atol(arg);
+    return NULL;
 }
 
 int get_max_request_len(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->max_request_len : DEFAULT_MAX_REQUEST_LEN;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->max_request_len : DEFAULT_MAX_REQUEST_LEN;
 }
 
 const char *set_max_mem_request_len(cmd_parms * cmd, void *dummy,
-									const char *arg)
+                                    const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->max_mem_request_len = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->max_mem_request_len = atol(arg);
+    return NULL;
 }
 
 int get_max_mem_request_len(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->
-		max_mem_request_len : DEFAULT_MAX_MEM_REQUEST_LEN;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->
+        max_mem_request_len : DEFAULT_MAX_MEM_REQUEST_LEN;
 }
 
 const char *set_spawn_score(cmd_parms * cmd, void *dummy, const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->spawn_score = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->spawn_score = atol(arg);
+    return NULL;
 }
 
 int get_spawn_score(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->spawn_score : DEFAULT_SPAWN_SCORE;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->spawn_score : DEFAULT_SPAWN_SCORE;
 }
 
 const char *set_time_score(cmd_parms * cmd, void *dummy, const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->time_score = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->time_score = atol(arg);
+    return NULL;
 }
 
 int get_time_score(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->time_score : DEFAULT_TIME_SCORE;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->time_score : DEFAULT_TIME_SCORE;
 }
 
 const char *set_termination_score(cmd_parms * cmd, void *dummy,
-								  const char *arg)
+                                  const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->termination_score = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->termination_score = atol(arg);
+    return NULL;
 }
 
 int get_termination_score(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->termination_score : DEFAULT_TERMINATION_SCORE;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->termination_score : DEFAULT_TERMINATION_SCORE;
 }
 
 const char *set_max_process(cmd_parms * cmd, void *dummy, const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->max_process_count = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->max_process_count = atol(arg);
+    return NULL;
 }
 
 int get_max_process(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->max_process_count : DEFAULT_MAX_PROCESS_COUNT;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->max_process_count : DEFAULT_MAX_PROCESS_COUNT;
 }
 
 const char *set_output_buffersize(cmd_parms * cmd, void *dummy,
-								  const char *arg)
+                                  const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->output_buffersize = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->output_buffersize = atol(arg);
+    return NULL;
 }
 
 int get_output_buffersize(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->output_buffersize : DEFAULT_OUTPUT_BUFFERSIZE;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->output_buffersize : DEFAULT_OUTPUT_BUFFERSIZE;
 }
 
 const char *set_max_class_process(cmd_parms * cmd, void *dummy,
-								  const char *arg)
+                                  const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->max_class_process_count = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->max_class_process_count = atol(arg);
+    return NULL;
 }
 
 int get_max_class_process(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->
-		max_class_process_count : DEFAULT_MAX_CLASS_PROCESS_COUNT;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->
+        max_class_process_count : DEFAULT_MAX_CLASS_PROCESS_COUNT;
 }
 
 const char *set_min_class_process(cmd_parms * cmd, void *dummy,
-								  const char *arg)
+                                  const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->min_class_process_count = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->min_class_process_count = atol(arg);
+    return NULL;
 }
 
 int get_min_class_process(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->
-		min_class_process_count : DEFAULT_MIN_CLASS_PROCESS_COUNT;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->
+        min_class_process_count : DEFAULT_MIN_CLASS_PROCESS_COUNT;
 }
 
 const char *set_php_fix_pathinfo_enable(cmd_parms * cmd, void *dummy,
-										const char *arg)
+                                        const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->php_fix_pathinfo_enable = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->php_fix_pathinfo_enable = atol(arg);
+    return NULL;
 }
 
 const char *set_max_requests_per_process(cmd_parms * cmd, void *dummy,
-										 const char *arg)
+                                         const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->max_requests_per_process = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->max_requests_per_process = atol(arg);
+    return NULL;
 }
 
 int get_max_requests_per_process(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->
-		max_requests_per_process : DEFAULT_MAX_REQUESTS_PER_PROCESS;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->
+        max_requests_per_process : DEFAULT_MAX_REQUESTS_PER_PROCESS;
 }
 
 int get_php_fix_pathinfo_enable(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->php_fix_pathinfo_enable : 0;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->php_fix_pathinfo_enable : 0;
 }
 
 const char *set_ipc_connect_timeout(cmd_parms * cmd, void *dummy,
-									const char *arg)
+                                    const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->ipc_connect_timeout = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->ipc_connect_timeout = atol(arg);
+    return NULL;
 }
 
 int get_ipc_connect_timeout(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->
-		ipc_connect_timeout : DEFAULT_IPC_CONNECT_TIMEOUT;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->
+        ipc_connect_timeout : DEFAULT_IPC_CONNECT_TIMEOUT;
 }
 
 const char *set_ipc_comm_timeout(cmd_parms * cmd, void *dummy,
-								 const char *arg)
+                                 const char *arg)
 {
-	server_rec *s = cmd->server;
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	config->ipc_comm_timeout = atol(arg);
-	return NULL;
+    server_rec *s = cmd->server;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    config->ipc_comm_timeout = atol(arg);
+    return NULL;
 }
 
 int get_ipc_comm_timeout(server_rec * s)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(s->module_config, &fcgid_module);
-	return config ? config->ipc_comm_timeout : DEFAULT_IPC_COMM_TIMEOUT;
+    fcgid_server_conf *config =
+        ap_get_module_config(s->module_config, &fcgid_module);
+    return config ? config->ipc_comm_timeout : DEFAULT_IPC_COMM_TIMEOUT;
 }
 
 const char *add_default_env_vars(cmd_parms * cmd, void *dummy,
-								 const char *name, const char *value)
+                                 const char *name, const char *value)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(cmd->server->module_config, &fcgid_module);;
-	if (config->default_init_env == NULL)
-		config->default_init_env = apr_table_make(cmd->pool, 20);
+    fcgid_server_conf *config =
+        ap_get_module_config(cmd->server->module_config, &fcgid_module);;
+    if (config->default_init_env == NULL)
+        config->default_init_env = apr_table_make(cmd->pool, 20);
 
-	apr_table_set(config->default_init_env, name, value ? value : "");
-	return NULL;
+    apr_table_set(config->default_init_env, name, value ? value : "");
+    return NULL;
 }
 
 apr_table_t *get_default_env_vars(request_rec * r)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(r->server->module_config, &fcgid_module);
-	return config->default_init_env;
+    fcgid_server_conf *config =
+        ap_get_module_config(r->server->module_config, &fcgid_module);
+    return config->default_init_env;
 }
 
 const char *add_pass_headers(cmd_parms * cmd, void *dummy,
-							 const char *names)
+                             const char *names)
 {
-	const char **header;
-	fcgid_server_conf *config =
-		ap_get_module_config(cmd->server->module_config, &fcgid_module);
-	if (config->pass_headers == NULL)
-		config->pass_headers =
-			apr_array_make(cmd->pool, 10, sizeof(const char *));
+    const char **header;
+    fcgid_server_conf *config =
+        ap_get_module_config(cmd->server->module_config, &fcgid_module);
+    if (config->pass_headers == NULL)
+        config->pass_headers =
+            apr_array_make(cmd->pool, 10, sizeof(const char *));
 
-	header = (const char **) apr_array_push(config->pass_headers);
-	*header = ap_getword_conf(cmd->pool, &names);
+    header = (const char **) apr_array_push(config->pass_headers);
+    *header = ap_getword_conf(cmd->pool, &names);
 
-	return header ? NULL : "Invalid PassHeaders";
+    return header ? NULL : "Invalid PassHeaders";
 }
 
 apr_array_header_t *get_pass_headers(request_rec * r)
 {
-	fcgid_server_conf *config =
-		ap_get_module_config(r->server->module_config, &fcgid_module);
-	return config->pass_headers;
+    fcgid_server_conf *config =
+        ap_get_module_config(r->server->module_config, &fcgid_module);
+    return config->pass_headers;
 }
 
 const char *set_authenticator_info(cmd_parms * cmd, void *config,
-								   const char *authenticator)
+                                   const char *authenticator)
 {
-	apr_status_t rv;
-	apr_finfo_t finfo;
-	fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
-
-	/* Is the wrapper exist? */
-	if ((rv = apr_stat(&finfo, authenticator, APR_FINFO_NORM,
-					   cmd->temp_pool)) != APR_SUCCESS) {
-		return apr_psprintf(cmd->pool,
-							"can't get authenticator file info: %s, errno: %d",
-							authenticator, apr_get_os_error());
-	}
-
-	/* Create the wrapper node */
-	dirconfig->authenticator_info =
-		apr_pcalloc(cmd->server->process->pconf,
-					sizeof(*dirconfig->authenticator_info));
-	if (!dirconfig->authenticator_info)
-		return "Can't alloc memory for authenticator_info";
-	strncpy(dirconfig->authenticator_info->path, authenticator,
-			_POSIX_PATH_MAX - 1);
-	dirconfig->authenticator_info->path[_POSIX_PATH_MAX - 1] = '\0';
-	dirconfig->authenticator_info->inode = finfo.inode;
-	dirconfig->authenticator_info->deviceid = finfo.device;
-	dirconfig->authenticator_info->share_group_id = (apr_size_t) - 1;
-	return NULL;
+    apr_status_t rv;
+    apr_finfo_t finfo;
+    fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
+
+    /* Is the wrapper exist? */
+    if ((rv = apr_stat(&finfo, authenticator, APR_FINFO_NORM,
+                       cmd->temp_pool)) != APR_SUCCESS) {
+        return apr_psprintf(cmd->pool,
+                            "can't get authenticator file info: %s, errno: %d",
+                            authenticator, apr_get_os_error());
+    }
+
+    /* Create the wrapper node */
+    dirconfig->authenticator_info =
+        apr_pcalloc(cmd->server->process->pconf,
+                    sizeof(*dirconfig->authenticator_info));
+    if (!dirconfig->authenticator_info)
+        return "Can't alloc memory for authenticator_info";
+    strncpy(dirconfig->authenticator_info->path, authenticator,
+            _POSIX_PATH_MAX - 1);
+    dirconfig->authenticator_info->path[_POSIX_PATH_MAX - 1] = '\0';
+    dirconfig->authenticator_info->inode = finfo.inode;
+    dirconfig->authenticator_info->deviceid = finfo.device;
+    dirconfig->authenticator_info->share_group_id = (apr_size_t) - 1;
+    return NULL;
 }
 
 const char *set_authenticator_authoritative(cmd_parms * cmd,
-											void *config, int arg)
+                                            void *config, int arg)
 {
-	fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
+    fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
 
-	dirconfig->authenticator_authoritative = arg;
-	return NULL;
+    dirconfig->authenticator_authoritative = arg;
+    return NULL;
 }
 
 auth_conf *get_authenticator_info(request_rec * r, int *authoritative)
 {
-	fcgid_dir_conf *config =
-		ap_get_module_config(r->per_dir_config, &fcgid_module);
+    fcgid_dir_conf *config =
+        ap_get_module_config(r->per_dir_config, &fcgid_module);
 
-	if (config != NULL && config->authenticator_info != NULL) {
-		*authoritative = config->authenticator_authoritative;
-		return config->authenticator_info;
-	}
+    if (config != NULL && config->authenticator_info != NULL) {
+        *authoritative = config->authenticator_authoritative;
+        return config->authenticator_info;
+    }
 
-	return NULL;
+    return NULL;
 }
 
 const char *set_authorizer_info(cmd_parms * cmd, void *config,
-								const char *authorizer)
+                                const char *authorizer)
 {
-	apr_status_t rv;
-	apr_finfo_t finfo;
-	fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
-
-	/* Is the wrapper exist? */
-	if ((rv = apr_stat(&finfo, authorizer, APR_FINFO_NORM,
-					   cmd->temp_pool)) != APR_SUCCESS) {
-		return apr_psprintf(cmd->pool,
-							"can't get authorizer file info: %s, errno: %d",
-							authorizer, apr_get_os_error());
-	}
-
-	/* Create the wrapper node */
-	dirconfig->authorizer_info =
-		apr_pcalloc(cmd->server->process->pconf,
-					sizeof(*dirconfig->authorizer_info));
-	if (!dirconfig->authorizer_info)
-		return "Can't alloc memory for authorizer";
-	strncpy(dirconfig->authorizer_info->path, authorizer,
-			_POSIX_PATH_MAX - 1);
-	dirconfig->authorizer_info->path[_POSIX_PATH_MAX - 1] = '\0';
-	dirconfig->authorizer_info->inode = finfo.inode;
-	dirconfig->authorizer_info->deviceid = finfo.device;
-	dirconfig->authorizer_info->share_group_id = (apr_size_t) - 1;
-	return NULL;
+    apr_status_t rv;
+    apr_finfo_t finfo;
+    fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
+
+    /* Is the wrapper exist? */
+    if ((rv = apr_stat(&finfo, authorizer, APR_FINFO_NORM,
+                       cmd->temp_pool)) != APR_SUCCESS) {
+        return apr_psprintf(cmd->pool,
+                            "can't get authorizer file info: %s, errno: %d",
+                            authorizer, apr_get_os_error());
+    }
+
+    /* Create the wrapper node */
+    dirconfig->authorizer_info =
+        apr_pcalloc(cmd->server->process->pconf,
+                    sizeof(*dirconfig->authorizer_info));
+    if (!dirconfig->authorizer_info)
+        return "Can't alloc memory for authorizer";
+    strncpy(dirconfig->authorizer_info->path, authorizer,
+            _POSIX_PATH_MAX - 1);
+    dirconfig->authorizer_info->path[_POSIX_PATH_MAX - 1] = '\0';
+    dirconfig->authorizer_info->inode = finfo.inode;
+    dirconfig->authorizer_info->deviceid = finfo.device;
+    dirconfig->authorizer_info->share_group_id = (apr_size_t) - 1;
+    return NULL;
 }
 
 const char *set_authorizer_authoritative(cmd_parms * cmd,
-										 void *config, int arg)
+                                         void *config, int arg)
 {
-	fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
+    fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
 
-	dirconfig->authorizer_authoritative = arg;
-	return NULL;
+    dirconfig->authorizer_authoritative = arg;
+    return NULL;
 }
 
 auth_conf *get_authorizer_info(request_rec * r, int *authoritative)
 {
-	fcgid_dir_conf *config =
-		ap_get_module_config(r->per_dir_config, &fcgid_module);
+    fcgid_dir_conf *config =
+        ap_get_module_config(r->per_dir_config, &fcgid_module);
 
-	if (config != NULL && config->authorizer_info != NULL) {
-		*authoritative = config->authorizer_authoritative;
-		return config->authorizer_info;
-	}
+    if (config != NULL && config->authorizer_info != NULL) {
+        *authoritative = config->authorizer_authoritative;
+        return config->authorizer_info;
+    }
 
-	return NULL;
+    return NULL;
 }
 
 const char *set_access_info(cmd_parms * cmd, void *config,
-							const char *access)
+                            const char *access)
 {
-	apr_status_t rv;
-	apr_finfo_t finfo;
-	fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
-
-	/* Is the wrapper exist? */
-	if ((rv = apr_stat(&finfo, access, APR_FINFO_NORM,
-					   cmd->temp_pool)) != APR_SUCCESS) {
-		return apr_psprintf(cmd->pool,
-							"can't get authorizer file info: %s, errno: %d",
-							access, apr_get_os_error());
-	}
-
-	/* Create the wrapper node */
-	dirconfig->access_info =
-		apr_pcalloc(cmd->server->process->pconf,
-					sizeof(*dirconfig->access_info));
-	if (!dirconfig->access_info)
-		return "Can't alloc memory for access";
-	strncpy(dirconfig->access_info->path, access, _POSIX_PATH_MAX - 1);
-	dirconfig->access_info->path[_POSIX_PATH_MAX - 1] = '\0';
-	dirconfig->access_info->inode = finfo.inode;
-	dirconfig->access_info->deviceid = finfo.device;
-	dirconfig->access_info->share_group_id = (apr_size_t) - 1;
-	return NULL;
+    apr_status_t rv;
+    apr_finfo_t finfo;
+    fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
+
+    /* Is the wrapper exist? */
+    if ((rv = apr_stat(&finfo, access, APR_FINFO_NORM,
+                       cmd->temp_pool)) != APR_SUCCESS) {
+        return apr_psprintf(cmd->pool,
+                            "can't get authorizer file info: %s, errno: %d",
+                            access, apr_get_os_error());
+    }
+
+    /* Create the wrapper node */
+    dirconfig->access_info =
+        apr_pcalloc(cmd->server->process->pconf,
+                    sizeof(*dirconfig->access_info));
+    if (!dirconfig->access_info)
+        return "Can't alloc memory for access";
+    strncpy(dirconfig->access_info->path, access, _POSIX_PATH_MAX - 1);
+    dirconfig->access_info->path[_POSIX_PATH_MAX - 1] = '\0';
+    dirconfig->access_info->inode = finfo.inode;
+    dirconfig->access_info->deviceid = finfo.device;
+    dirconfig->access_info->share_group_id = (apr_size_t) - 1;
+    return NULL;
 }
 
 const char *set_access_authoritative(cmd_parms * cmd,
-									 void *config, int arg)
+                                     void *config, int arg)
 {
-	fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
+    fcgid_dir_conf *dirconfig = (fcgid_dir_conf *) config;
 
-	dirconfig->access_authoritative = arg;
-	return NULL;
+    dirconfig->access_authoritative = arg;
+    return NULL;
 }
 
 auth_conf *get_access_info(request_rec * r, int *authoritative)
 {
-	fcgid_dir_conf *config =
-		ap_get_module_config(r->per_dir_config, &fcgid_module);
+    fcgid_dir_conf *config =
+        ap_get_module_config(r->per_dir_config, &fcgid_module);
 
-	if (config != NULL && config->access_info != NULL) {
-		*authoritative = config->access_authoritative;
-		return config->access_info;
-	}
+    if (config != NULL && config->access_info != NULL) {
+        *authoritative = config->access_authoritative;
+        return config->access_info;
+    }
 
-	return NULL;
+    return NULL;
 }
 
 typedef struct {
-	apr_hash_t *wrapper_id_hash;
-	apr_size_t cur_id;
+    apr_hash_t *wrapper_id_hash;
+    apr_size_t cur_id;
 } wrapper_id_info;
 
 const char *set_wrapper_config(cmd_parms * cmd, void *dirconfig,
-							   const char *wrapperpath,
-							   const char *extension)
+                               const char *wrapperpath,
+                               const char *extension)
 {
-	const char *path, *tmp;
-	apr_status_t rv;
-	apr_finfo_t finfo;
-	const char *userdata_key = "fcgid_wrapper_id";
-	wrapper_id_info *id_info;
-	apr_size_t *wrapper_id;
-	fcgid_wrapper_conf *wrapper = NULL;
-	fcgid_dir_conf *config = (fcgid_dir_conf *) dirconfig;
-
-	/* Sanity check */
-	if (wrapperpath == NULL || extension == NULL
-		|| *extension != '.' || *(extension + 1) == '\0'
-		|| strchr(extension, '/') || strchr(extension, '\\'))
-		return "Invalid wrapper file extension";
-
-	/* Get wrapper_id base on wrapperpath */
-	apr_pool_userdata_get((void *) &id_info, userdata_key,
-						  cmd->server->process->pool);
-	if (!id_info) {
-		id_info =
-			apr_pcalloc(cmd->server->process->pool, sizeof(*id_info));
-		id_info->wrapper_id_hash =
-			apr_hash_make(cmd->server->process->pool);
-		apr_pool_userdata_set((const void *) id_info, userdata_key,
-							  apr_pool_cleanup_null,
-							  cmd->server->process->pool);
-	}
-	if ((wrapper_id =
-		 apr_hash_get(id_info->wrapper_id_hash, wrapperpath,
-					  strlen(wrapperpath))) == NULL) {
-		wrapper_id =
-			apr_pcalloc(cmd->server->process->pool, sizeof(*wrapper_id));
-		*wrapper_id = id_info->cur_id++;
-		apr_hash_set(id_info->wrapper_id_hash, wrapperpath,
-					 strlen(wrapperpath), wrapper_id);
-	}
-
-	wrapper = apr_pcalloc(cmd->server->process->pconf, sizeof(*wrapper));
-	if (!wrapper)
-		return "Can't alloc memory for wrapper";
-
-	/* Get wrapper path */
-	tmp = wrapperpath;
-	path = ap_getword_white(cmd->temp_pool, &tmp);
-	if (path == NULL || *path == '\0')
-		return "Invalid wrapper config";
-
-	/* Is the wrapper exist? */
-	if ((rv = apr_stat(&finfo, path, APR_FINFO_NORM,
-					   cmd->temp_pool)) != APR_SUCCESS) {
-		return apr_psprintf(cmd->pool,
-							"can't get fastcgi file info: %s(%s), errno: %d",
-							wrapperpath, path, apr_get_os_error());
-	}
-
-	strncpy(wrapper->args, wrapperpath, _POSIX_PATH_MAX - 1);
-	wrapper->args[_POSIX_PATH_MAX - 1] = '\0';
-	wrapper->inode = finfo.inode;
-	wrapper->deviceid = finfo.device;
-	wrapper->share_group_id = *wrapper_id;
-	*wrapper_id++;
-
-	/* Add the node now */
-	apr_hash_set(config->wrapper_info_hash, extension, strlen(extension),
-				 wrapper);
+    const char *path, *tmp;
+    apr_status_t rv;
+    apr_finfo_t finfo;
+    const char *userdata_key = "fcgid_wrapper_id";
+    wrapper_id_info *id_info;
+    apr_size_t *wrapper_id;
+    fcgid_wrapper_conf *wrapper = NULL;
+    fcgid_dir_conf *config = (fcgid_dir_conf *) dirconfig;
+
+    /* Sanity check */
+    if (wrapperpath == NULL || extension == NULL
+        || *extension != '.' || *(extension + 1) == '\0'
+        || strchr(extension, '/') || strchr(extension, '\\'))
+        return "Invalid wrapper file extension";
+
+    /* Get wrapper_id base on wrapperpath */
+    apr_pool_userdata_get((void *) &id_info, userdata_key,
+                          cmd->server->process->pool);
+    if (!id_info) {
+        id_info =
+            apr_pcalloc(cmd->server->process->pool, sizeof(*id_info));
+        id_info->wrapper_id_hash =
+            apr_hash_make(cmd->server->process->pool);
+        apr_pool_userdata_set((const void *) id_info, userdata_key,
+                              apr_pool_cleanup_null,
+                              cmd->server->process->pool);
+    }
+    if ((wrapper_id =
+         apr_hash_get(id_info->wrapper_id_hash, wrapperpath,
+                      strlen(wrapperpath))) == NULL) {
+        wrapper_id =
+            apr_pcalloc(cmd->server->process->pool, sizeof(*wrapper_id));
+        *wrapper_id = id_info->cur_id++;
+        apr_hash_set(id_info->wrapper_id_hash, wrapperpath,
+                     strlen(wrapperpath), wrapper_id);
+    }
+
+    wrapper = apr_pcalloc(cmd->server->process->pconf, sizeof(*wrapper));
+    if (!wrapper)
+        return "Can't alloc memory for wrapper";
+
+    /* Get wrapper path */
+    tmp = wrapperpath;
+    path = ap_getword_white(cmd->temp_pool, &tmp);
+    if (path == NULL || *path == '\0')
+        return "Invalid wrapper config";
+
+    /* Is the wrapper exist? */
+    if ((rv = apr_stat(&finfo, path, APR_FINFO_NORM,
+                       cmd->temp_pool)) != APR_SUCCESS) {
+        return apr_psprintf(cmd->pool,
+                            "can't get fastcgi file info: %s(%s), errno: %d",
+                            wrapperpath, path, apr_get_os_error());
+    }
+
+    strncpy(wrapper->args, wrapperpath, _POSIX_PATH_MAX - 1);
+    wrapper->args[_POSIX_PATH_MAX - 1] = '\0';
+    wrapper->inode = finfo.inode;
+    wrapper->deviceid = finfo.device;
+    wrapper->share_group_id = *wrapper_id;
+    *wrapper_id++;
+
+    /* Add the node now */
+    apr_hash_set(config->wrapper_info_hash, extension, strlen(extension),
+                 wrapper);
 
-	return NULL;
+    return NULL;
 }
 
 fcgid_wrapper_conf *get_wrapper_info(const char *cgipath, request_rec * r)
 {
-	char *extension;
-	fcgid_wrapper_conf *wrapper;
-	fcgid_dir_conf *config =
-		ap_get_module_config(r->per_dir_config, &fcgid_module);
-
-	/* Get file name extension */
-	extension = ap_strrchr_c(cgipath, '.');
-	if (extension == NULL)
-		return NULL;
-
-	/* Search file name extension in per_dir_config */
-	if (config
-		&& (wrapper =
-			apr_hash_get(config->wrapper_info_hash, extension,
-						 strlen(extension))))
-		return wrapper;
+    char *extension;
+    fcgid_wrapper_conf *wrapper;
+    fcgid_dir_conf *config =
+        ap_get_module_config(r->per_dir_config, &fcgid_module);
+
+    /* Get file name extension */
+    extension = ap_strrchr_c(cgipath, '.');
+    if (extension == NULL)
+        return NULL;
+
+    /* Search file name extension in per_dir_config */
+    if (config
+        && (wrapper =
+            apr_hash_get(config->wrapper_info_hash, extension,
+                         strlen(extension))))
+        return wrapper;
 
-	return NULL;
+    return NULL;
 }

Modified: httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.h
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.h?rev=755634&r1=755633&r2=755634&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.h (original)
+++ httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.h Wed Mar 18 16:37:31 2009
@@ -21,96 +21,96 @@
 #include "fcgid_global.h"
 
 typedef struct {
-	char path[_POSIX_PATH_MAX];
-	apr_ino_t inode;
-	apr_dev_t deviceid;
-	apr_size_t share_group_id;
+    char path[_POSIX_PATH_MAX];
+    apr_ino_t inode;
+    apr_dev_t deviceid;
+    apr_size_t share_group_id;
 } auth_conf;
 
 typedef struct {
-	char args[_POSIX_PATH_MAX];
-	apr_ino_t inode;
-	apr_dev_t deviceid;
-	apr_size_t share_group_id;
+    char args[_POSIX_PATH_MAX];
+    apr_ino_t inode;
+    apr_dev_t deviceid;
+    apr_size_t share_group_id;
 } fcgid_wrapper_conf;
 
 typedef struct {
-	int idle_timeout;
-	int idle_scan_interval;
-	int busy_scan_interval;
-	int proc_lifetime;
-	int error_scan_interval;
-	int zombie_scan_interval;
-	char *sockname_prefix;
-	char *shmname_path;
-	int spawnscore_uplimit;
-	int spawn_score;
-	int termination_score;
-	int time_score;
-	int max_process_count;
-	int max_class_process_count;
-	int min_class_process_count;
-	int max_request_len;
-	int max_mem_request_len;
-	int output_buffersize;
-	int max_requests_per_process;
-	apr_table_t *default_init_env;
-	apr_array_header_t *pass_headers;
-	int ipc_connect_timeout;
-	int ipc_comm_timeout;
-	int busy_timeout;
-	int php_fix_pathinfo_enable;
+    int idle_timeout;
+    int idle_scan_interval;
+    int busy_scan_interval;
+    int proc_lifetime;
+    int error_scan_interval;
+    int zombie_scan_interval;
+    char *sockname_prefix;
+    char *shmname_path;
+    int spawnscore_uplimit;
+    int spawn_score;
+    int termination_score;
+    int time_score;
+    int max_process_count;
+    int max_class_process_count;
+    int min_class_process_count;
+    int max_request_len;
+    int max_mem_request_len;
+    int output_buffersize;
+    int max_requests_per_process;
+    apr_table_t *default_init_env;
+    apr_array_header_t *pass_headers;
+    int ipc_connect_timeout;
+    int ipc_comm_timeout;
+    int busy_timeout;
+    int php_fix_pathinfo_enable;
 } fcgid_server_conf;
 
 typedef struct {
-	/* wrapper */
-	apr_hash_t *wrapper_info_hash;
+    /* wrapper */
+    apr_hash_t *wrapper_info_hash;
 
-	/* authenticator */
-	auth_conf *authenticator_info;
-	int authenticator_authoritative;
-
-	/* authorizer */
-	auth_conf *authorizer_info;
-	int authorizer_authoritative;
-
-	/* access check */
-	auth_conf *access_info;
-	int access_authoritative;
+    /* authenticator */
+    auth_conf *authenticator_info;
+    int authenticator_authoritative;
+
+    /* authorizer */
+    auth_conf *authorizer_info;
+    int authorizer_authoritative;
+
+    /* access check */
+    auth_conf *access_info;
+    int access_authoritative;
 } fcgid_dir_conf;
 
 void *create_fcgid_server_config(apr_pool_t * p, server_rec * s);
 void *merge_fcgid_server_config(apr_pool_t * p, void *basev,
-								void *overridesv);
+                                void *overridesv);
 
 void *create_fcgid_dir_config(apr_pool_t * p, char *dummy);
 
 const char *set_idle_timeout(cmd_parms * cmd, void *dummy,
-							 const char *arg);
+                             const char *arg);
 int get_idle_timeout(server_rec * s);
 
 const char *set_idle_scan_interval(cmd_parms * cmd, void *dummy,
-								   const char *arg);
+                                   const char *arg);
 int get_idle_scan_interval(server_rec * s);
 
 const char *set_busy_timeout(cmd_parms * cmd, void *dummy,
-							 const char *arg);
+                             const char *arg);
 int get_busy_timeout(server_rec * s);
 
 const char *set_busy_scan_interval(cmd_parms * cmd, void *dummy,
-								   const char *arg);
+                                   const char *arg);
 int get_busy_scan_interval(server_rec * s);
 
 const char *set_proc_lifetime(cmd_parms * cmd, void *dummy,
-							  const char *arg);
+                              const char *arg);
 int get_proc_lifetime(server_rec * s);
 
 const char *set_error_scan_interval(cmd_parms * cmd, void *dummy,
-									const char *arg);
+                                    const char *arg);
 int get_error_scan_interval(server_rec * s);
 
 const char *set_zombie_scan_interval(cmd_parms * cmd, void *dummy,
-									 const char *arg);
+                                     const char *arg);
 int get_zombie_scan_interval(server_rec * s);
 
 const char *set_socketpath(cmd_parms * cmd, void *dummy, const char *arg);
@@ -123,84 +123,84 @@
 int get_time_score(server_rec * s);
 
 const char *set_max_request_len(cmd_parms * cmd, void *dummy,
-								const char *arg);
+                                const char *arg);
 int get_max_request_len(server_rec * s);
 
 const char *set_max_mem_request_len(cmd_parms * cmd, void *dummy,
-									const char *arg);
+                                    const char *arg);
 int get_max_mem_request_len(server_rec * s);
 
 const char *set_termination_score(cmd_parms * cmd, void *dummy,
-								  const char *arg);
+                                  const char *arg);
 int get_termination_score(server_rec * s);
 
 const char *set_spawn_score(cmd_parms * cmd, void *dummy, const char *arg);
 int get_spawn_score(server_rec * s);
 
 const char *set_spawnscore_uplimit(cmd_parms * cmd, void *dummy,
-								   const char *arg);
+                                   const char *arg);
 int get_spawnscore_uplimit(server_rec * s);
 
 const char *set_max_process(cmd_parms * cmd, void *dummy, const char *arg);
 int get_max_process(server_rec * s);
 
 const char *set_max_class_process(cmd_parms * cmd, void *dummy,
-								  const char *arg);
+                                  const char *arg);
 int get_max_class_process(server_rec * s);
 
 const char *set_min_class_process(cmd_parms * cmd, void *dummy,
-								  const char *arg);
+                                  const char *arg);
 int get_min_class_process(server_rec * s);
 
 const char *set_ipc_connect_timeout(cmd_parms * cmd, void *dummy,
-									const char *arg);
+                                    const char *arg);
 int get_ipc_connect_timeout(server_rec * s);
 
 const char *set_ipc_comm_timeout(cmd_parms * cmd, void *dummy,
-								 const char *arg);
+                                 const char *arg);
 int get_ipc_comm_timeout(server_rec * s);
 
 const char *set_output_buffersize(cmd_parms * cmd, void *dummy,
-								  const char *arg);
+                                  const char *arg);
 int get_output_buffersize(server_rec * s);
 
 const char *add_default_env_vars(cmd_parms * cmd, void *sconf,
-								 const char *name, const char *value);
+                                 const char *name, const char *value);
 apr_table_t *get_default_env_vars(request_rec * r);
 
 const char *add_pass_headers(cmd_parms * cmd, void *sconf,
-							 const char *name);
+                             const char *name);
 
 apr_array_header_t *get_pass_headers(request_rec * r);
 
 const char *set_wrapper_config(cmd_parms * cmd, void *dummy,
-							   const char *wrapper, const char *extension);
+                               const char *wrapper, const char *extension);
 fcgid_wrapper_conf *get_wrapper_info(const char *cgipath, request_rec * r);
 
 const char *set_authenticator_info(cmd_parms * cmd, void *config,
-								   const char *arg);
+                                   const char *arg);
 const char *set_authenticator_authoritative(cmd_parms * cmd,
-											void *config, int arg);
+                                            void *config, int arg);
 auth_conf *get_authenticator_info(request_rec * r, int *authoritative);
 
 const char *set_authorizer_info(cmd_parms * cmd, void *config,
-								const char *arg);
+                                const char *arg);
 const char *set_authorizer_authoritative(cmd_parms * cmd,
-										 void *config, int arg);
+                                         void *config, int arg);
 auth_conf *get_authorizer_info(request_rec * r, int *authoritative);
 
 const char *set_access_info(cmd_parms * cmd, void *config,
-							const char *arg);
+                            const char *arg);
 const char *set_access_authoritative(cmd_parms * cmd,
-									 void *config, int arg);
+                                     void *config, int arg);
 auth_conf *get_access_info(request_rec * r, int *authoritative);
 
 const char *set_php_fix_pathinfo_enable(cmd_parms * cmd, void *dummy,
-										const char *arg);
+                                        const char *arg);
 int get_php_fix_pathinfo_enable(server_rec * s);
 
 const char *set_max_requests_per_process(cmd_parms * cmd, void *dummy,
-										 const char *arg);
+                                         const char *arg);
 int get_max_requests_per_process(server_rec * s);
 
 #endif

Modified: httpd/mod_fcgid/trunk/mod_fcgid/fcgid_filter.c
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/mod_fcgid/fcgid_filter.c?rev=755634&r1=755633&r2=755634&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/mod_fcgid/fcgid_filter.c (original)
+++ httpd/mod_fcgid/trunk/mod_fcgid/fcgid_filter.c Wed Mar 18 16:37:31 2009
@@ -26,80 +26,80 @@
 
 apr_status_t fcgid_filter(ap_filter_t * f, apr_bucket_brigade * bb)
 {
-	apr_status_t rv;
-	apr_bucket_brigade *tmp_brigade;
-	int save_size = 0;
-	conn_rec *c = f->c;
-	server_rec *main_server = f->r->server;
-
-	if (!g_hasinit) {
-		g_buffsize = get_output_buffersize(main_server);
-		g_hasinit = 1;
-	}
-
-	tmp_brigade =
-		apr_brigade_create(f->r->pool, f->r->connection->bucket_alloc);
-	while (!APR_BRIGADE_EMPTY(bb)) {
-		apr_size_t readlen;
-		const char *buffer;
-
-		apr_bucket *e = APR_BRIGADE_FIRST(bb);
-
-		if (APR_BUCKET_IS_EOS(e))
-			break;
-
-		if (APR_BUCKET_IS_METADATA(e)) {
-			apr_bucket_delete(e);
-			continue;
-		}
-
-		/* Read the bucket now */
-		if ((rv = apr_bucket_read(e, &buffer, &readlen,
-								  APR_BLOCK_READ)) != APR_SUCCESS) {
-			ap_log_error(APLOG_MARK, APLOG_INFO, rv,
-						 main_server,
-						 "mod_fcgid: can't read data from fcgid handler");
-			return rv;
-		}
-
-		/* Move on to next bucket if it's fastcgi header bucket */
-		if (e->type == &ap_bucket_type_fcgid_header
-			|| (e->type == &apr_bucket_type_immortal && readlen == 0)) {
-			apr_bucket_delete(e);
-			continue;
-		}
-		save_size += readlen;
-
-		/* Cache it to tmp_brigade */
-		APR_BUCKET_REMOVE(e);
-		APR_BRIGADE_INSERT_TAIL(tmp_brigade, e);
-
-		/* I will pass tmp_brigade to next filter if I have got too much buckets */
-		if (save_size > g_buffsize) {
-			APR_BRIGADE_INSERT_TAIL(tmp_brigade,
-									apr_bucket_flush_create(f->r->
-															connection->
-															bucket_alloc));
-
-			if ((rv =
-				 ap_pass_brigade(f->next, tmp_brigade)) != APR_SUCCESS)
-				return rv;
-
-			/* Is the client aborted? */
-			if (c && c->aborted)
-				return APR_SUCCESS;
-
-			save_size = 0;
-		}
-	}
-
-	/* Any thing left? */
-	if (!APR_BRIGADE_EMPTY(tmp_brigade)) {
-		if ((rv = ap_pass_brigade(f->next, tmp_brigade)) != APR_SUCCESS)
-			return rv;
-	}
-
-	/* This filter is done once it has served up its content */
-	ap_remove_output_filter(f);
-	return APR_SUCCESS;
+    apr_status_t rv;
+    apr_bucket_brigade *tmp_brigade;
+    int save_size = 0;
+    conn_rec *c = f->c;
+    server_rec *main_server = f->r->server;
+
+    if (!g_hasinit) {
+        g_buffsize = get_output_buffersize(main_server);
+        g_hasinit = 1;
+    }
+
+    tmp_brigade =
+        apr_brigade_create(f->r->pool, f->r->connection->bucket_alloc);
+    while (!APR_BRIGADE_EMPTY(bb)) {
+        apr_size_t readlen;
+        const char *buffer;
+
+        apr_bucket *e = APR_BRIGADE_FIRST(bb);
+
+        if (APR_BUCKET_IS_EOS(e))
+            break;
+
+        if (APR_BUCKET_IS_METADATA(e)) {
+            apr_bucket_delete(e);
+            continue;
+        }
+
+        /* Read the bucket now */
+        if ((rv = apr_bucket_read(e, &buffer, &readlen,
+                                  APR_BLOCK_READ)) != APR_SUCCESS) {
+            ap_log_error(APLOG_MARK, APLOG_INFO, rv,
+                         main_server,
+                         "mod_fcgid: can't read data from fcgid handler");
+            return rv;
+        }
+
+        /* Move on to next bucket if it's fastcgi header bucket */
+        if (e->type == &ap_bucket_type_fcgid_header
+            || (e->type == &apr_bucket_type_immortal && readlen == 0)) {
+            apr_bucket_delete(e);
+            continue;
+        }
+        save_size += readlen;
+
+        /* Cache it to tmp_brigade */
+        APR_BUCKET_REMOVE(e);
+        APR_BRIGADE_INSERT_TAIL(tmp_brigade, e);
+
+        /* I will pass tmp_brigade to next filter if I have got too much buckets */
+        if (save_size > g_buffsize) {
+            APR_BRIGADE_INSERT_TAIL(tmp_brigade,
+                                    apr_bucket_flush_create(f->r->
+                                                            connection->
+                                                            bucket_alloc));
+
+            if ((rv =
+                 ap_pass_brigade(f->next, tmp_brigade)) != APR_SUCCESS)
+                return rv;
+
+            /* Is the client aborted? */
+            if (c && c->aborted)
+                return APR_SUCCESS;
+
+            save_size = 0;
+        }
+    }
+
+    /* Any thing left? */
+    if (!APR_BRIGADE_EMPTY(tmp_brigade)) {
+        if ((rv = ap_pass_brigade(f->next, tmp_brigade)) != APR_SUCCESS)
+            return rv;
+    }
+
+    /* This filter is done once it has served up its content */
+    ap_remove_output_filter(f);
+    return APR_SUCCESS;
 }

Modified: httpd/mod_fcgid/trunk/mod_fcgid/fcgid_pm.h
URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/mod_fcgid/fcgid_pm.h?rev=755634&r1=755633&r2=755634&view=diff
==============================================================================
--- httpd/mod_fcgid/trunk/mod_fcgid/fcgid_pm.h (original)
+++ httpd/mod_fcgid/trunk/mod_fcgid/fcgid_pm.h Wed Mar 18 16:37:31 2009
@@ -23,32 +23,32 @@
 #define INITENV_CNT 64
 
 typedef struct {
-	char cgipath[_POSIX_PATH_MAX];
-	char wrapperpath[_POSIX_PATH_MAX];
-	apr_ino_t inode;
-	dev_t deviceid;
-	apr_size_t share_grp_id;
-	char *virtualhost;	/* Virtualhost granularity */
-	uid_t uid;					/* For suEXEC */
-	gid_t gid;					/* For suEXEC */
-	int userdir;				/* For suEXEC */
-	char initenv_key[INITENV_CNT][INITENV_KEY_LEN];
-	char initenv_val[INITENV_CNT][INITENV_VAL_LEN];
+    char cgipath[_POSIX_PATH_MAX];
+    char wrapperpath[_POSIX_PATH_MAX];
+    apr_ino_t inode;
+    dev_t deviceid;
+    apr_size_t share_grp_id;
+    char *virtualhost;  /* Virtualhost granularity */
+    uid_t uid;                  /* For suEXEC */
+    gid_t gid;                  /* For suEXEC */
+    int userdir;                /* For suEXEC */
+    char initenv_key[INITENV_CNT][INITENV_KEY_LEN];
+    char initenv_val[INITENV_CNT][INITENV_VAL_LEN];
 } fcgid_command;
 
 void procmgr_init_spawn_cmd(fcgid_command * command, request_rec * r,
-							const char *argv0, dev_t deviceid,
-							apr_ino_t inode, apr_size_t share_grp_id);
+                            const char *argv0, dev_t deviceid,
+                            apr_ino_t inode, apr_size_t share_grp_id);
 apr_status_t procmgr_post_spawn_cmd(fcgid_command * command,
-									request_rec * r);
+                                    request_rec * r);
 apr_status_t procmgr_peek_cmd(fcgid_command * command,
-							  server_rec * main_server);
+                              server_rec * main_server);
 apr_status_t procmgr_finish_notify(server_rec * main_server);
 
 apr_status_t procmgr_child_init(server_rec * main_server,
-								apr_pool_t * pchild);
+                                apr_pool_t * pchild);
 apr_status_t procmgr_post_config(server_rec * main_server,
-								 apr_pool_t * pconf);
+                                 apr_pool_t * pconf);
 
 apr_status_t procmgr_stop_procmgr(void *dummy);
 int procmgr_must_exit(void);



Mime
View raw message