dgaudet 97/04/16 19:52:53
Modified: src CHANGES mod_rewrite.c mod_rewrite.h Log: Updated mod_rewrite to 3.0.5: Fixes problem with rewriting inside <Directory> sections missing a trailing /. Reviewed by: Dean, Randy Submitted by: Ralf Revision Changes Path 1.236 +2 -0 apache/src/CHANGES Index: CHANGES =================================================================== RCS file: /export/home/cvs/apache/src/CHANGES,v retrieving revision 1.235 retrieving revision 1.236 diff -C3 -r1.235 -r1.236 *** CHANGES 1997/04/17 02:50:19 1.235 --- CHANGES 1997/04/17 02:52:50 1.236 *************** *** 7,12 **** --- 7,14 ---- *) Updated mod_rewrite to 3.0.4: Fixes HTTP redirects from within .htaccess files because the RewriteBase was not replaced correctly. + Updated mod_rewrite to 3.0.5: Fixes problem with rewriting inside + <Directory> sections missing a trailing /. [Ralf S. Engelschall] *) Back out the HAVE_SHMGET change for Linux because it's too late in 1.27 +11 -2 apache/src/mod_rewrite.c Index: mod_rewrite.c =================================================================== RCS file: /export/home/cvs/apache/src/mod_rewrite.c,v retrieving revision 1.26 retrieving revision 1.27 diff -C3 -r1.26 -r1.27 *** mod_rewrite.c 1997/04/16 06:07:44 1.26 --- mod_rewrite.c 1997/04/17 02:52:51 1.27 *************** *** 61,67 **** ** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___| ** |_____| ** ! ** URL Rewriting Module, Version 3.0.4 (15-Apr-1997) ** ** 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 3.0.5 (16-Apr-1997) ** ** This module uses a rule-based rewriting engine (based on a ** regular-expression parser) to rewrite requested URLs on the fly. *************** *** 309,318 **** a->state = ENGINE_DISABLED; a->options = OPTION_NONE; - a->directory = pstrdup(p, path); a->baseurl = NULL; a->rewriteconds = make_array(p, 2, sizeof(rewritecond_entry)); a->rewriterules = make_array(p, 2, sizeof(rewriterule_entry)); return (void *)a; } --- 309,327 ---- a->state = ENGINE_DISABLED; a->options = OPTION_NONE; a->baseurl = NULL; a->rewriteconds = make_array(p, 2, sizeof(rewritecond_entry)); a->rewriterules = make_array(p, 2, sizeof(rewriterule_entry)); + + if (path == NULL) + a->directory = NULL; + else { + /* make sure it has a trailing slash */ + if (path[strlen(path)-1] == '/') + a->directory = pstrdup(p, path); + else + a->directory = pstrcat(p, path, "/", NULL); + } return (void *)a; } 1.22 +1 -1 apache/src/mod_rewrite.h Index: mod_rewrite.h =================================================================== RCS file: /export/home/cvs/apache/src/mod_rewrite.h,v retrieving revision 1.21 retrieving revision 1.22 diff -C3 -r1.21 -r1.22 *** mod_rewrite.h 1997/04/16 06:07:43 1.21 --- mod_rewrite.h 1997/04/17 02:52:51 1.22 *************** *** 64,70 **** ** |_| |_| |_|\___/ \__,_|___|_| \___| \_/\_/ |_| |_|\__\___| ** |_____| ** ! ** URL Rewriting Module, Version 3.0.4 (17-Apr-1997) ** ** 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 3.0.5 (16-Apr-1997) ** ** This module uses a rule-based rewriting engine (based on a ** regular-expression parser) to rewrite requested URLs on the fly.