DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24483>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24483 mod_usertrack dumps core...on apache 2.0.48 ------- Additional Comments From [EMAIL PROTECTED] 2003-11-09 04:09 ------- The following is my first cut at a patch. It solves all of the problems, but it has not yet been assessed by anyone on the apache developer's list. Take the patch that follows, copy it to a file called mod_usertrack_2.0.48.patch, copy mod_usertrack_2.0.48.patch to httpd-2.0.48/modules/metadata, then run patch -p0 < mod_usertrack_2.0.48.patch and recompile. -Manni --- mod_usertrack-old.c 2003-11-08 01:42:11.000000000 -0500 +++ mod_usertrack.c 2003-11-08 23:02:28.000000000 -0500 @@ -104,7 +104,7 @@ #include "http_config.h" #include "http_core.h" #include "http_request.h" - +#include "http_log.h" module AP_MODULE_DECLARE_DATA usertrack_module; @@ -211,6 +211,14 @@ return DECLINED; } + /* Check to be sure there is a regexp available; it may not have + compiled, leaving dcfg->regexp null. */ + if (dcfg->regexp == NULL) { + ap_log_error(APLOG_MARK, APLOG_ERR, APR_SUCCESS, r->server, "The regular expression that will be used to find the usertrack cookie in the cookie header could not be compiled. Disabling mod_usertrack."); + dcfg->enabled = 0; + return DECLINED; + } + if ((cookie_header = apr_table_get(r->headers_in, (dcfg->style == CT_COOKIE2 ? "Cookie2" @@ -260,6 +268,21 @@ dcfg->cookie_domain = NULL; dcfg->style = CT_UNSET; dcfg->enabled = 0; + + /* The goal is to end up with this regexp, + * ^COOKIE_NAME=([^;]+)|;[ \t]+COOKIE_NAME=([^;]+) + * with COOKIE_NAME + * obviously substituted with the real cookie name defined + * by the COOKIE_NAME macro. This regexp will get replaced + * by the regexp in set_cookie_name() if the CookieName is + * used in httpd.conf. */ + dcfg->regexp_string = apr_pstrcat(p, "^", COOKIE_NAME, + "=([^;]+)|;[ \t]+", COOKIE_NAME, + "=([^;]+)", NULL); + + /* Remember that ap_pregcomp could return null, so + we will have to deal with this later in spot_cookie(). */ + dcfg->regexp = ap_pregcomp(p, dcfg->regexp_string, REG_EXTENDED); return dcfg; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
