Only in mod_fastcgisa-2.4.0_0.3: .gdb_history diff -ur mod_fastcgi-2.4.0/fcgi.h mod_fastcgisa-2.4.0_0.3/fcgi.h --- mod_fastcgi-2.4.0/fcgi.h Sun Sep 22 12:49:34 2002 +++ mod_fastcgisa-2.4.0_0.3/fcgi.h Fri Feb 28 22:19:43 2003 @@ -22,6 +22,10 @@ #include "http_log.h" #include "util_script.h" #include "util_md5.h" +/* Start TFA */ +/* Ralf's memory module */ +#include "mm.h" +/* End TFA */ /* AP2TODO there's probably a better way */ #ifdef STANDARD20_MODULE_STUFF @@ -225,6 +229,40 @@ struct _FastCgiServerInfo *next; } fcgi_server; +/* Start TFA */ + +typedef struct _Session { + int sessionNum; /* unique number for session */ + char *sessionID; /* name of session */ + fcgi_server *server; /* server that serves this session */ + int *last_hit; /* time when server was last hit */ + struct _Session *next; +} session; + +typedef struct _Session_Server { + const char *fs_path; /* filename of cgi script */ + int timeout; /* timeout period of session */ + int session_style; /* exclusive or shared */ + int session_tracking; /* cookies or ip address */ + char *cookie_name; /* name of cookie to keep track of session */ + int numSessions; /* number of sessions configured */ + session *sessions; /* all sessions associated with this server */ + struct _Session_Server *next; +} session_server; + +session_server *session_servers; /* list of configured session servers*/ +#define FCGI_SA_DEFAULT_SESSION_TIMEOUT 300 /* default session timeout*/ +#define FCGI_SA_LONGEST_NAME 300 /* longest possible pathname & session id combined */ +#define FCGI_SA_LONGEST_SESSIONID 64 /* longest possible pathname & session id combined */ +#define FCGI_SA_MAX_SHARED_MEMORY 0 /* shared memory that holds sessions. 0 = default */ +#define FCGI_SA_USECOOKIES 0 /* use cookies to keep track of sessions */ +#define FCGI_SA_USEIP 1 /* use ip address to keep track of sessions */ +#define FCGI_SA_EXCLUSIVE 1 /* each client has exlusive rights to a session server */ +#define FCGI_SA_SHARED_SESSIONS 0 /* clients share session servers*/ + +MM *session_memory; /* session memory shared between children */ + +/* End TFA */ /* * fcgi_request holds the state of a particular FastCGI request. @@ -492,6 +530,18 @@ /* * fcgi_util.c */ + +/* Start TFA */ +fcgi_server *fcgi_util_sess_get_by_hash(session_server *s, const char *sessionID); +char *fcgi_util_make_unique_id(pool *p, const request_rec *r); +session_server *fcgi_util_ss_get_by_id(const char *ePath, uid_t uid, gid_t gid); +const char *fcgi_util_get_sessionid_by_cookie(pool *p, session_server *ss, const request_rec *r); +session *fcgi_util_sess_new(pool *p); +void fcgi_util_sess_add(session_server *ss,session *sess); +fcgi_server *fcgi_util_sess_get_by_id(session_server *s, const char *sessionID, int *too_busy); +session_server *fcgi_util_ss_new(pool *p); +void fcgi_util_ss_add(session_server *s); +/* End TFA */ char *fcgi_util_socket_hash_filename(pool *p, const char *path, const char *user, const char *group); diff -ur mod_fastcgi-2.4.0/fcgi_config.c mod_fastcgisa-2.4.0_0.3/fcgi_config.c --- mod_fastcgi-2.4.0/fcgi_config.c Sun Dec 22 22:13:15 2002 +++ mod_fastcgisa-2.4.0_0.3/fcgi_config.c Fri Feb 28 22:19:43 2003 @@ -576,6 +576,16 @@ const char *name = cmd->cmd->name; char *fs_path = ap_getword_conf(p, &arg); const char *option, *err; + /* Start TFA */ + int i; + u_int num_sessions; + u_int session_timeout; + fcgi_server *x; + session_server *ss; + session *sess; + char *session_tracking = "ip_address"; + char *session_style = "shared_sessions"; + /* End TFA */ /* Allocate temp storage for the array of initial environment variables */ char **envp = ap_pcalloc(tp, sizeof(char *) * (MAX_INIT_ENV_VARS + 3)); @@ -585,6 +595,11 @@ HANDLE mutex; #endif + /* Start TFA */ + session_timeout = FCGI_SA_DEFAULT_SESSION_TIMEOUT; + num_sessions = 0; + /* End TFA */ + if (*fs_path == '\0') return "AppClass requires a pathname!?"; @@ -704,6 +719,28 @@ else if (strcasecmp(option, "-flush") == 0) { s->flush = 1; } + /* Start TFA */ + else if (strcasecmp(option, "-num_sessions") == 0) { + err = get_u_int(tp, &arg, &num_sessions, 0); + if (err != NULL) + return invalid_value(tp, name, fs_path, option, err); + } + else if (strcasecmp(option, "-session_timeout") == 0) { + err = get_u_int(tp, &arg, &session_timeout, 0); + if (err != NULL) + return invalid_value(tp, name, fs_path, option, err); + } + else if (strcasecmp(option, "-session_style") == 0) { + session_style = ap_getword_conf(tp, &arg); + if (*session_style == '\0') + return invalid_value(tp, name, fs_path, option, "\"\""); + } + else if (strcasecmp(option, "-session_tracking") == 0) { + session_tracking = ap_getword_conf(tp, &arg); + if (*session_tracking == '\0') + return invalid_value(tp, name, fs_path, option, "\"\""); + } + /* End TFA */ else if (strcasecmp(option, "-user") == 0) { #ifdef WIN32 return ap_psprintf(tp, @@ -767,6 +804,70 @@ /* Move env array to a surviving pool */ s->envp = (char **)ap_pcalloc(p, sizeof(char *) * (envc + 4)); memcpy(s->envp, envp, sizeof(char *) * envc); + /* Start TFA */ + if (num_sessions > 0) { + /* Add it to list of sessions */ + ss = fcgi_util_ss_new(p); + ss->numSessions = num_sessions; + ss->timeout = session_timeout; + ss->fs_path = fs_path; + if (strcmp(session_tracking,"ip_address")==0) { + ss->session_tracking = FCGI_SA_USEIP; + } else if (strcmp(session_tracking,"cookies")==0) { + ss->session_tracking = FCGI_SA_USECOOKIES; + ss->cookie_name = ap_psprintf(p,"FCGI_%s",fs_path); + } else { + ss->session_tracking = FCGI_SA_USEIP; + } + if (strcmp(session_style,"shared_sessions")==0) { + ss->session_style = FCGI_SA_SHARED_SESSIONS; + } else if (strcmp(session_style,"exclusive")==0) { + ss->session_style = FCGI_SA_EXCLUSIVE; + } else { + ss->session_style = FCGI_SA_USEIP; + } + fcgi_util_ss_add(ss); + for (i=0;ifs_path = ap_psprintf(p,"%s$Session:%i$",fs_path,i); + + /* Initialize process structs */ + x->procs = fcgi_util_fs_create_procs(p, 1); + + /* Build the appropriate sockaddr structure */ + if (x->port != 0) { + err = fcgi_util_socket_make_inet_addr(p, (struct sockaddr_in **)&x->socket_addr, + &x->socket_addr_len, NULL, x->port); + if (err != NULL) + return ap_psprintf(tp, "%s %s: %s", name, x->fs_path, err); + } else { + if (x->socket_path == NULL) + x->socket_path = fcgi_util_socket_hash_filename(tp, x->fs_path, x->user, x->group); + x->socket_path = fcgi_util_socket_make_path_absolute(p, x->socket_path, 0); + err = fcgi_util_socket_make_domain_addr(p, (struct sockaddr_un **)&x->socket_addr, + &x->socket_addr_len, x->socket_path); + if (err != NULL) + return ap_psprintf(tp, "%s %s: %s", name, x->fs_path, err); + } + + + /* Add it to the list of FastCGI servers */ + fcgi_util_fs_add(x); + + /* Add it to list of sessions */ + sess = fcgi_util_sess_new(p); + sess->server = x; + fcgi_util_sess_add(ss,sess); + } + /* probably should destroy s here, but I don't know how.*/ + + } else { + /* End TFA */ /* Initialize process structs */ s->procs = fcgi_util_fs_create_procs(p, s->numProcesses); @@ -808,6 +909,10 @@ /* Add it to the list of FastCGI servers */ fcgi_util_fs_add(s); + /* Start TFA */ + } + /* End TFA */ + return NULL; } @@ -821,6 +926,19 @@ const char * const name = cmd->cmd->name; char *fs_path = ap_getword_conf(p, &arg); const char *option, *err; + /* Start TFA */ + int i; + u_int num_sessions; + u_int session_timeout; + fcgi_server *x; + session_server *ss; + session *sess; + char *session_tracking = "ip_address"; + char *session_style = "shared_sessions"; + + session_timeout = FCGI_SA_DEFAULT_SESSION_TIMEOUT; + num_sessions = 0; + /* End TFA */ if (!*fs_path) { return ap_pstrcat(tp, name, " requires a path and either a -socket or -host option", NULL); @@ -877,6 +995,26 @@ if ((err = get_u_int(tp, &arg, &s->appConnectTimeout, 0))) return invalid_value(tp, name, fs_path, option, err); } + + /* Start TFA */ + else if (strcasecmp(option, "-num_sessions") == 0) { + if ((err = get_u_int(tp, &arg, &num_sessions, 0))) + return invalid_value(tp, name, fs_path, option, err); + } + else if (strcasecmp(option, "-session_timeout") == 0) { + if ((err = get_u_int(tp, &arg, &session_timeout, 0))) + return invalid_value(tp, name, fs_path, option, err); + } + else if (strcasecmp(option, "-session_style") == 0) { + if ((session_style = ap_getword_conf(tp, &arg)) == '\0') + return invalid_value(tp, name, fs_path, option, "\"\""); + } + else if (strcasecmp(option, "-session_tracking") == 0) { + if ((session_tracking = ap_getword_conf(tp, &arg)) == '\0') + return invalid_value(tp, name, fs_path, option, "\"\""); + } + /* End TFA */ + else if (strcasecmp(option, "-idle-timeout") == 0) { if ((err = get_u_int(tp, &arg, &s->idle_timeout, 1))) return invalid_value(tp, name, fs_path, option, err); @@ -954,6 +1092,62 @@ "%s %s: -socket or -host option missing", name, fs_path); } + /* Start TFA */ + if (num_sessions > 0) { + /* Add it to list of sessions */ + ss = fcgi_util_ss_new(p); + ss->numSessions = num_sessions; + ss->timeout = session_timeout; + ss->fs_path = fs_path; + if (strcmp(session_tracking,"ip_address")==0) { + ss->session_tracking = FCGI_SA_USEIP; + } else if (strcmp(session_tracking,"cookies")==0) { + ss->session_tracking = FCGI_SA_USECOOKIES; + ss->cookie_name = ap_psprintf(p,"FCGI_%s",fs_path); + } else { + ss->session_tracking = FCGI_SA_USEIP; + } + if (strcmp(session_style,"shared_sessions")==0) { + ss->session_style = FCGI_SA_SHARED_SESSIONS; + } else if (strcmp(session_style,"exclusive")==0) { + ss->session_style = FCGI_SA_EXCLUSIVE; + } else { + ss->session_style = FCGI_SA_USEIP; + } + fcgi_util_ss_add(ss); + for (i=0;ifs_path = ap_psprintf(p,"%s$Session:%i$",fs_path,i); + + /* Build the appropriate sockaddr structure */ + if (x->port != 0) { + err = fcgi_util_socket_make_inet_addr(p, (struct sockaddr_in **)&x->socket_addr, + &x->socket_addr_len, x->host, (x->port + i)); + if (err != NULL) + return ap_psprintf(tp, "%s %s: %s", name, fs_path, err); + } else { + return ap_psprintf(tp, "Socket paths not supported for sessions. Use Ports. %s %s: %s", name, fs_path, err); + } + + + /* Add it to the list of FastCGI servers */ + fcgi_util_fs_add(x); + + /* Add it to list of sessions */ + sess = fcgi_util_sess_new(p); + sess->server = x; + fcgi_util_sess_add(ss,sess); + } + /* probably should destroy s here, but I don't know how. */ + + } else { + /* End TFA */ + /* Build the appropriate sockaddr structure */ if (s->port != 0) { err = fcgi_util_socket_make_inet_addr(p, (struct sockaddr_in **)&s->socket_addr, @@ -982,6 +1176,10 @@ /* Add it to the list of FastCGI servers */ fcgi_util_fs_add(s); + + /* Start TFA */ + } + /* End TFA */ return NULL; } diff -ur mod_fastcgi-2.4.0/fcgi_pm.c mod_fastcgisa-2.4.0_0.3/fcgi_pm.c --- mod_fastcgi-2.4.0/fcgi_pm.c Sun Jan 19 11:33:51 2003 +++ mod_fastcgisa-2.4.0_0.3/fcgi_pm.c Fri Feb 28 22:19:43 2003 @@ -350,6 +350,9 @@ int i; char *dirName; char *dnEnd, *failedSysCall; + /* Start TFA */ + char *rpnEnd, *realProgramName; + /* End TFA */ child_pid = fork(); if (child_pid) { @@ -358,12 +361,26 @@ /* We're the child. We're gonna exec() so pools don't matter. */ - dnEnd = strrchr(fs->fs_path, '/'); + /* Start TFA */ + + /* modify name, if necessary, for sessions + * Relies on the program name not having a $ in the name */ + + rpnEnd = strchr(fs->fs_path, '$'); + if ( rpnEnd != NULL) { + realProgramName = ap_pcalloc(fcgi_config_pool, rpnEnd - fs->fs_path + 1); + realProgramName = memcpy(realProgramName, fs->fs_path, rpnEnd - fs->fs_path); + } else { + realProgramName = fs->fs_path; + } + /* End TFA */ + + dnEnd = strrchr(realProgramName, '/'); if (dnEnd == NULL) { dirName = "./"; } else { - dirName = ap_pcalloc(fcgi_config_pool, dnEnd - fs->fs_path + 1); - dirName = memcpy(dirName, fs->fs_path, dnEnd - fs->fs_path); + dirName = ap_pcalloc(fcgi_config_pool, dnEnd - realProgramName + 1); + dirName = memcpy(dirName, realProgramName, dnEnd - realProgramName); } if (chdir(dirName) < 0) { failedSysCall = "chdir()"; @@ -413,7 +430,7 @@ * server's - AP20 does. I (now) consider the latter approach better * (fcgi_pm.c v1.42 incorporated the 1.3 behaviour, v1.84 reverted it). */ - shortName = strrchr(fs->fs_path, '/') + 1; + shortName = strrchr(realProgramName, '/') + 1; do { execle(fcgi_wrapper, fcgi_wrapper, fs->username, fs->group, @@ -422,7 +439,7 @@ } else { do { - execle(fs->fs_path, fs->fs_path, NULL, fs->envp); + execle(realProgramName, realProgramName, NULL, fs->envp); } while (errno == EINTR); } diff -ur mod_fastcgi-2.4.0/fcgi_util.c mod_fastcgisa-2.4.0_0.3/fcgi_util.c --- mod_fastcgi-2.4.0/fcgi_util.c Mon Oct 21 22:44:15 2002 +++ mod_fastcgisa-2.4.0_0.3/fcgi_util.c Tue Sep 2 17:00:24 2003 @@ -119,6 +119,17 @@ } else { +/* Start TFA/SK */ + if (fcgi_socket_dir == NULL) + { +#ifdef WIN32 + fcgi_socket_dir = DEFAULT_SOCK_DIR; +#else + fcgi_socket_dir = ap_server_root_relative(p, DEFAULT_SOCK_DIR); +#endif + } + fcgi_dynamic_dir = ap_pstrcat(p, fcgi_socket_dir, "/dynamic", NULL); +/* End TFA/SK */ const char * parent_dir = dynamic ? fcgi_dynamic_dir : fcgi_socket_dir; return (const char *) make_full_path(p, parent_dir, file); } @@ -520,4 +531,204 @@ #endif } +/* Start TFA */ + +/******************************************************************************* + * Allocate a new Session record from pool p with default values. + */ +session * +fcgi_util_sess_new(pool *p) +{ + session *s = (session *) ap_pcalloc(p, sizeof(session)); + /* Initialize anything who's init state is not zeroizzzzed */ + s->sessionID = NULL; + return s; +} + +/******************************************************************************* + * Add the server to the linked list of Sessions. + */ +void +fcgi_util_sess_add(session_server *ss,session *sess) +{ + sess->next = (session *)ss->sessions; + ss->sessions = sess; +} + +/******************************************************************************* + * Allocate a new Session Affinity server record from pool p with default values. + */ +session_server * +fcgi_util_ss_new(pool *p) +{ + session_server *s = (session_server *) ap_pcalloc(p, sizeof(session_server)); + /* Initialize anything who's init state is not zeroizzzzed */ + s->timeout = FCGI_SA_DEFAULT_SESSION_TIMEOUT; + s->sessions = NULL; + return s; +} + +/******************************************************************************* + * Add the server to the linked list of Session Affinity servers. + */ +void +fcgi_util_ss_add(session_server *s) +{ + s->next = session_servers; + session_servers = s; +} + +/******************************************************************************* + * Find a FastCGI session with a matching sessionid, or the first free session + */ +fcgi_server * +fcgi_util_sess_get_by_id(session_server *s, const char *sessionID, int *too_busy) +{ + session *sess; + session *first_free; + int found_free = 0; + time_t now = time(NULL); + *too_busy = 1; + for (sess = (session *)s->sessions; sess != NULL; sess=sess->next) { + if ((sess->sessionID != NULL)&&(strcmp(sess->sessionID, sessionID)==0)) { + *too_busy = 0; + memcpy(sess->last_hit,&now,sizeof(int)); + return sess->server; + } else if (found_free == 0) { + if ((now - *sess->last_hit) > s->timeout) { + first_free = sess; + found_free = 1; + } + } + } /* for */ + + if (found_free == 0) { + return NULL; + } else { + *too_busy = 0; + sprintf(first_free->sessionID,"%s",sessionID); + memcpy(first_free->last_hit,&now,sizeof(int)); + return first_free->server; + } +} + +/******************************************************************************* + * Find a FastCGI session using a hash + */ +fcgi_server * +fcgi_util_sess_get_by_hash(session_server *s, const char *sessionID) +{ + session *sess; + int sID_length; + int i; + int sum = 0; + int hash_key; + + sID_length = strlen(sessionID); + + for (i=0; i < sID_length; i++) { + sum = sum + *(sessionID + i); + if ( sum < 0) { sum = 0; } + } + + hash_key = sum % s->numSessions; + +#ifdef SADEBUG + fprintf(stderr, "sum=%d hash_key=%d nsess=%d id=%s\n",sum,hash_key,s->numSessions,sessionID); +#endif + + sess = (session *)s->sessions; + for (i=0;i < hash_key;i++) { + sess = sess->next; + } + + return sess->server; +} + +/******************************************************************************* + * Find a session server with a matching fs_path, and if fcgi_wrapper is + * enabled with matching uid and gid. + */ +session_server * +fcgi_util_ss_get_by_id(const char *ePath, uid_t uid, gid_t gid) +{ + session_server *s; + session *sess; + for (s = session_servers; s != NULL; s = s->next) { + if (strcmp(s->fs_path, ePath) == 0) { + sess = (session *)s->sessions; + if (fcgi_wrapper == NULL || (uid == sess->server->uid && gid == sess->server->gid)) { + return s; + } + } + } + return NULL; +} + + + +/******************************************************************************* + * Get A Unique Number + */ +char *fcgi_util_make_unique_id(pool *p, const request_rec *r) +{ + return ap_psprintf(p,"%i%s%i",getppid(),r->connection->remote_ip,time(NULL)); +} + +/******************************************************************************* + * Return a session based on a cookie presented + */ +const char * +fcgi_util_get_sessionid_by_cookie(pool *p, session_server *ss, const request_rec *r) +{ + int i; + const char *cookieheader; + const char *chend; + int max; + int c_n_len; + const char *d_end; + char *ret_val; + char *temp; + + cookieheader = ap_table_get(r->headers_in,"Cookie"); + + if (cookieheader==NULL) { + ret_val = fcgi_util_make_unique_id(p,r); + temp = ap_psprintf(p,"%s=%s",ss->cookie_name,ret_val); + ap_table_add(r->headers_out,"Set-Cookie",temp); + return ret_val; + } + + c_n_len = strlen(ss->cookie_name); + chend=cookieheader+strlen(cookieheader); + while (cookieheader < (chend-c_n_len)) { + if (*cookieheader == ' ') { + cookieheader++; + continue; + } + if(!strncmp(cookieheader,ss->cookie_name,c_n_len)) { + if ( (cookieheader=strchr(cookieheader,'=')) == NULL ) + break; + + if ( (d_end=strchr(cookieheader,';')) == NULL ) + d_end=chend; + + cookieheader++; + + return ap_pstrndup(p,cookieheader,d_end-cookieheader); + } + if ( (cookieheader=strchr(cookieheader,';')) == NULL ) + break; + + cookieheader++; + } + + ret_val = fcgi_util_make_unique_id(p,r); + temp = ap_psprintf(p,"%s=%s",ss->cookie_name,ret_val); + ap_table_add(r->headers_out,"Set-Cookie",temp); + return ret_val; +} + + +/* End TFA */ diff -ur mod_fastcgi-2.4.0/mod_fastcgi.c mod_fastcgisa-2.4.0_0.3/mod_fastcgi.c --- mod_fastcgi-2.4.0/mod_fastcgi.c Sun Dec 22 22:19:14 2002 +++ mod_fastcgisa-2.4.0_0.3/mod_fastcgi.c Tue Sep 2 17:11:04 2003 @@ -265,15 +265,22 @@ const char *err; #endif + /* Start TFA */ + session_server *ss; + session *sess; + char *mm_file; + int j = 0; + /* End TFA */ + /* Register to reset to default values when the config pool is cleaned */ ap_block_alarms(); ap_register_cleanup(p, NULL, fcgi_config_reset_globals, ap_null_cleanup); ap_unblock_alarms(); #ifdef APACHE2 - ap_add_version_component(p, "mod_fastcgi/" MOD_FASTCGI_VERSION); + ap_add_version_component(p, "mod_fastcgisa/" MOD_FASTCGI_VERSION); #else - ap_add_version_component("mod_fastcgi/" MOD_FASTCGI_VERSION); + ap_add_version_component("mod_fastcgisa/" MOD_FASTCGI_VERSION); #endif fcgi_config_set_fcgi_uid_n_gid(1); @@ -323,6 +330,25 @@ #endif + /* Start TFA */ + mm_file = (char *)ap_palloc(p, strlen(fcgi_socket_dir) + 10); + /* create session memory */ + for (ss=session_servers;ss!=NULL;ss=ss->next) { + for (sess=(session *)ss->sessions;sess!=NULL;sess=sess->next) { + j++; + } + } + sprintf(mm_file,"%s/mm_file",fcgi_socket_dir); + session_memory = mm_create(((j+2)*(FCGI_SA_LONGEST_SESSIONID + sizeof(int))),mm_file); + for (ss = session_servers;ss != NULL;ss = ss->next) { + for (sess=(session *)ss->sessions;sess!=NULL;sess=sess->next) { + sess->sessionID = (char *) mm_malloc (session_memory,FCGI_SA_LONGEST_SESSIONID); + sess->last_hit = (int *) mm_malloc (session_memory,sizeof(int)); + } + } + /* End TFA */ + + /* Create the pipe for comm with the PM */ if (pipe(fcgi_pm_pipe) < 0) { ap_log_error(FCGI_LOG_ERR, s, "FastCGI: pipe() failed"); @@ -2402,13 +2428,42 @@ fcgi_request * const fr = (fcgi_request *)ap_pcalloc(p, sizeof(fcgi_request)); uid_t uid; gid_t gid; + /* Start TFA */ + session_server *ss; + const char *sessionID; + int too_busy; + /* End TFA */ + fs_path = path ? path : r->filename; get_request_identity(r, &uid, &gid); fs = fcgi_util_fs_get_by_id(fs_path, uid, gid); + /* Start TFA */ + if (fs == NULL) { + ss = fcgi_util_ss_get_by_id(fs_path, uid, gid); + if (ss != NULL) { + if (ss->session_tracking == FCGI_SA_USECOOKIES) { + sessionID = fcgi_util_get_sessionid_by_cookie(p,ss,r); + } else { + sessionID = r->connection->remote_ip; + } + if (ss->session_style == FCGI_SA_EXCLUSIVE) { + fs = fcgi_util_sess_get_by_id(ss,sessionID,&too_busy); + } else { + fs = fcgi_util_sess_get_by_hash(ss,sessionID); + too_busy = 0; + } + if (too_busy == 1) { + ap_log_rerror(FCGI_LOG_ERR_NOERRNO, r, "FastCGI: No more free sessions for \"%s\"", fs_path); + return NULL; + } + } + } + /* End TFA */ + if (fs == NULL) { const char * err; @@ -2810,9 +2865,13 @@ uid_t uid; gid_t gid; + ap_log_rerror(FCGI_LOG_INFO_NOERRNO, r, + "FastCGI: lookup %s", r->filename); + get_request_identity(r, &uid, &gid); - if (fcgi_util_fs_get_by_id(r->filename, uid, gid)) + if (fcgi_util_fs_get_by_id(r->filename, uid, gid) || + fcgi_util_ss_get_by_id(r->filename,uid,gid)) /* Added TFA */ { r->handler = FASTCGI_HANDLER_NAME; return OK; diff -ur mod_fastcgi-2.4.0/mod_fastcgi.h mod_fastcgisa-2.4.0_0.3/mod_fastcgi.h --- mod_fastcgi-2.4.0/mod_fastcgi.h Sun Jan 19 11:36:49 2003 +++ mod_fastcgisa-2.4.0_0.3/mod_fastcgi.h Tue Sep 2 10:40:02 2003 @@ -5,7 +5,7 @@ #ifndef MOD_FASTCGI_H #define MOD_FASTCGI_H -#define MOD_FASTCGI_VERSION "2.4.0" +#define MOD_FASTCGI_VERSION "2.4.0_0.3" #define FASTCGI_HANDLER_NAME "fastcgi-script"