randy 96/12/24 11:40:20
Modified: src CHANGES mod_rewrite.c mod_rewrite.h Log: Sync mod_rewrite with Patchlevel 10. Submitted by: Ralf Engelschall Revision Changes Path 1.98 +2 -0 apache/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.97 retrieving revision 1.98 diff -C3 -r1.97 -r1.98 *** CHANGES 1996/12/24 19:17:49 1.97 --- CHANGES 1996/12/24 19:40:15 1.98 *************** *** 1,5 **** --- 1,7 ---- Changes with Apache 1.2b3: + *) Sync mod_rewrite with patch level 10. [Ralf Engelschall] + *) Add changes to improve the error message given for invalid ServerName parameters. [Dirk vanGulik] 1.11 +27 -27 apache/src/mod_rewrite.c Index: mod_rewrite.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_rewrite.c,v retrieving revision 1.10 retrieving revision 1.11 diff -C3 -r1.10 -r1.11 *** mod_rewrite.c 1996/12/12 00:36:09 1.10 --- mod_rewrite.c 1996/12/24 19:40:16 1.11 *************** *** 61,67 **** ** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___| ** |_____| ** ! ** URL Rewriting Module, Version 2.3.9 (11-12-1996) ** ** This module uses a rule-based rewriting engine (based on a ** regular-expression parser) to rewrite requested URLs on the fly. --- 61,67 ---- ** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___| ** |_____| ** ! ** URL Rewriting Module, Version 2.3.10 (20-12-1996) ** ** This module uses a rule-based rewriting engine (based on a ** regular-expression parser) to rewrite requested URLs on the fly. *************** *** 1087,1093 **** rewrite_perdir_conf *dconf; char *cp; char *cp2; ! static char prefix[MAX_STRING_LEN]; int l; dconf = (rewrite_perdir_conf *)get_module_config(r->per_dir_config, &rewrite_module); --- 1087,1093 ---- rewrite_perdir_conf *dconf; char *cp; char *cp2; ! char *prefix; int l; dconf = (rewrite_perdir_conf *)get_module_config(r->per_dir_config, &rewrite_module); *************** *** 1236,1242 **** document_root if it is prefix */ if ((cp = document_root(r)) != NULL) { ! strcpy(prefix, cp); /* allways NOT have a trailing slash */ l = strlen(prefix); if (prefix[l-1] == '/') { --- 1236,1242 ---- document_root if it is prefix */ if ((cp = document_root(r)) != NULL) { ! prefix = pstrdup(r->pool, cp); /* allways NOT have a trailing slash */ l = strlen(prefix); if (prefix[l-1] == '/') { *************** *** 1374,1381 **** char *uri; char *output; int flags; ! static char newuri[MAX_STRING_LEN]; ! static char port[32]; #ifdef HAS_APACHE_REGEX_LIB regex_t *regexp; regmatch_t regmatch[10]; --- 1374,1381 ---- char *uri; char *output; int flags; ! char newuri[MAX_STRING_LEN]; ! char port[32]; #ifdef HAS_APACHE_REGEX_LIB regex_t *regexp; regmatch_t regmatch[10]; *************** *** 1613,1619 **** static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p, char *perdir) { #ifndef HAS_APACHE_REGEX_LIB ! static char inputbuf[MAX_STRING_LEN]; int i; #endif char *input; --- 1613,1619 ---- static int apply_rewrite_cond(request_rec *r, rewritecond_entry *p, char *perdir) { #ifndef HAS_APACHE_REGEX_LIB ! char inputbuf[LONG_STRING_LEN]; int i; #endif char *input; *************** *** 1693,1703 **** static void splitout_queryargs(request_rec *r) { char *q; ! static char olduri[MAX_STRING_LEN]; q = strchr(r->filename, '?'); if (q != NULL) { ! strcpy(olduri, r->filename); *q++ = '\0'; r->args = pstrcat(r->pool, q, "&", r->args, NULL); if (r->args[strlen(r->args)-1] == '&') --- 1693,1703 ---- static void splitout_queryargs(request_rec *r) { char *q; ! char *olduri; q = strchr(r->filename, '?'); if (q != NULL) { ! olduri = pstrdup(r->pool, r->filename); *q++ = '\0'; r->args = pstrcat(r->pool, q, "&", r->args, NULL); if (r->args[strlen(r->args)-1] == '&') *************** *** 1722,1730 **** char *hostp; char *url; char c; ! static char host[MAX_STRING_LEN]; ! static char buf[MAX_STRING_LEN]; ! static char olduri[MAX_STRING_LEN]; #ifdef APACHE_SSL if ( (!r->connection->client->ssl && --- 1722,1730 ---- char *hostp; char *url; char c; ! char host[LONG_STRING_LEN]; ! char buf[MAX_STRING_LEN]; ! char *olduri; #ifdef APACHE_SSL if ( (!r->connection->client->ssl && *************** *** 1736,1742 **** #endif /* there was really a rewrite to a remote path */ ! strcpy(olduri, r->filename); /* save for logging */ /* cut the hostname and port out of the URI */ #ifdef APACHE_SSL --- 1736,1742 ---- #endif /* there was really a rewrite to a remote path */ ! olduri = pstrdup(r->pool, r->filename); /* save for logging */ /* cut the hostname and port out of the URI */ #ifdef APACHE_SSL *************** *** 1801,1807 **** static char *expand_tildepaths(request_rec *r, char *uri) { ! static char user[MAX_STRING_LEN]; struct passwd *pw; char *newuri; int i, j; --- 1801,1807 ---- static char *expand_tildepaths(request_rec *r, char *uri) { ! char user[LONG_STRING_LEN]; struct passwd *pw; char *newuri; int i, j; *************** *** 1845,1859 **** static void expand_map_lookups(request_rec *r, char *uri) { ! static char newuri[MAX_STRING_LEN]; char *cpI; char *cpIE; char *cpO; char *cpT; char *cpT2; ! static char mapname[MAX_STRING_LEN]; ! static char mapkey[MAX_STRING_LEN]; ! static char defaultvalue[MAX_STRING_LEN]; int n; cpI = uri; --- 1845,1859 ---- static void expand_map_lookups(request_rec *r, char *uri) { ! char newuri[MAX_STRING_LEN]; char *cpI; char *cpIE; char *cpO; char *cpT; char *cpT2; ! char mapname[LONG_STRING_LEN]; ! char mapkey[LONG_STRING_LEN]; ! char defaultvalue[LONG_STRING_LEN]; int n; cpI = uri; *************** *** 2067,2073 **** datum dbmkey; datum dbmval; char *value = NULL; ! static char buf[MAX_STRING_LEN]; dbmkey.dptr = key; dbmkey.dsize = strlen(key); --- 2067,2073 ---- datum dbmkey; datum dbmval; char *value = NULL; ! char buf[MAX_STRING_LEN]; dbmkey.dptr = key; dbmkey.dsize = strlen(key); *************** *** 2086,2102 **** static char *lookup_map_program(request_rec *r, int fpin, int fpout, char *key) { ! static char buf[MAX_STRING_LEN]; char c; int i; /* write out the request key */ ! sprintf(buf, "%s\n", key); ! write(fpin, buf, strlen(buf)); /* read in the response value */ i = 0; ! while (read(fpout, &c, 1) == 1) { if (c == '\n') break; buf[i++] = c; --- 2086,2102 ---- static char *lookup_map_program(request_rec *r, int fpin, int fpout, char *key) { ! char buf[LONG_STRING_LEN]; char c; int i; /* write out the request key */ ! write(fpin, key, strlen(key)); ! write(fpin, "\n", 1); /* read in the response value */ i = 0; ! while (read(fpout, &c, 1) == 1 && (i < LONG_STRING_LEN)) { if (c == '\n') break; buf[i++] = c; *************** *** 2229,2235 **** long timz; #endif struct tm *t; ! static char tstr[MAX_STRING_LEN]; char sign; t = get_gmtoff(&timz); --- 2229,2235 ---- long timz; #endif struct tm *t; ! char tstr[80]; char sign; t = get_gmtoff(&timz); *************** *** 2364,2370 **** static char *lookup_variable(request_rec *r, char *var) { char *result; ! static char resultbuf[MAX_STRING_LEN]; time_t tc; struct tm *tm; --- 2364,2370 ---- static char *lookup_variable(request_rec *r, char *var) { char *result; ! char resultbuf[LONG_STRING_LEN]; time_t tc; struct tm *tm; *************** *** 2654,2661 **** static char *subst_prefix_path(request_rec *r, char *input, char *match, char *subst) { ! static char matchbuf[MAX_STRING_LEN]; ! static char substbuf[MAX_STRING_LEN]; char *output; int l; --- 2654,2661 ---- static char *subst_prefix_path(request_rec *r, char *input, char *match, char *subst) { ! char matchbuf[LONG_STRING_LEN]; ! char substbuf[LONG_STRING_LEN]; char *output; int l; *************** *** 2781,2787 **** static int prefix_stat(const char *path, struct stat *sb) { ! static char curpath[MAX_STRING_LEN]; char *cp; strcpy(curpath, path); --- 2781,2787 ---- static int prefix_stat(const char *path, struct stat *sb) { ! char curpath[LONG_STRING_LEN]; char *cp; strcpy(curpath, path); 1.13 +5 -1 apache/src/mod_rewrite.h Index: mod_rewrite.h =================================================================== RCS file: /export/home/cvs/apache/src/mod_rewrite.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C3 -r1.12 -r1.13 *** mod_rewrite.h 1996/12/12 00:36:11 1.12 --- mod_rewrite.h 1996/12/24 19:40:17 1.13 *************** *** 64,70 **** ** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___| ** |_____| ** ! ** URL Rewriting Module, Version 2.3.9 (11-12-1996) ** ** This module uses a rule-based rewriting engine (based on a ** regular-expression parser) to rewrite requested URLs on the fly. --- 64,70 ---- ** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___| ** |_____| ** ! ** URL Rewriting Module, Version 2.3.10 (20-12-1996) ** ** This module uses a rule-based rewriting engine (based on a ** regular-expression parser) to rewrite requested URLs on the fly. *************** *** 189,194 **** --- 189,198 ---- #ifndef NO #define NO FALSE #define YES TRUE + #endif + + #ifndef LONG_STRING_LEN + #define LONG_STRING_LEN 2048 #endif