From: William A. Rowe Jr <wrowe@apache.org>
Date: Fri, 24 Aug 2007 00:54:15 +0000 (+0000)
Subject: SEDFILTER has several anomolies; first, it's not SED syntax,
X-Git-Tag: 2.3.0~1552
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f3a7745a1f7892b5b45913ef0af8aad13b745f1c;p=apache

SEDFILTER has several anomolies; first, it's not SED syntax,
but more mod-rewrite like (and using the rewrite pcre parser).
Secondly, 'FILTER' in the filter name is redundant.  Simplify,
by renaming this 'REWRITE' filter.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@569204 13f79535-47bb-0310-9956-ffa450edef68
---

diff --git a/modules/experimental/config.m4 b/modules/experimental/config.m4
index ec86935329..8f2dbab944 100644
--- a/modules/experimental/config.m4
+++ b/modules/experimental/config.m4
@@ -4,6 +4,6 @@ APACHE_MODPATH_INIT(experimental)
 APACHE_MODULE(example, example and demo module, , , no)
 APACHE_MODULE(case_filter, example uppercase conversion filter, , , no)
 APACHE_MODULE(case_filter_in, example uppercase conversion input filter, , , no)
-APACHE_MODULE(sedfilter, response body sed-like filtering, , , no)
+APACHE_MODULE(rewrite_filter, response content rewrite-like filtering, , , no)
 
 APACHE_MODPATH_FINISH
diff --git a/modules/experimental/mod_sedfilter.c b/modules/experimental/mod_rewrite_filter.c
similarity index 98%
rename from modules/experimental/mod_sedfilter.c
rename to modules/experimental/mod_rewrite_filter.c
index c907a86272..d7010decf1 100644
--- a/modules/experimental/mod_sedfilter.c
+++ b/modules/experimental/mod_rewrite_filter.c
@@ -15,7 +15,7 @@
  */
 
 /*
- * mod_sedfilter.c: Perform sed-like rewriting on the fly
+ * mod_rewrite_filter.c: Perform content rewriting on the fly
  */
 
 #include "httpd.h"
@@ -31,9 +31,9 @@
 #define APR_WANT_STRFUNC
 #include "apr_want.h"
 
-static const char sedFilterName[] = "SEDFILTER";
+static const char rewrite_filter_name[] = "REWRITE";
 
-module AP_MODULE_DECLARE_DATA sedfilter_module;
+module AP_MODULE_DECLARE_DATA rewrite_filter_module;
 
 typedef struct {
     const apr_strmatch_pattern *pattern;
@@ -111,7 +111,7 @@ static apr_bucket_brigade *do_pattmatch(ap_filter_t *f, apr_bucket *inb)
 
     sed_module_dcfg *cfg =
     (sed_module_dcfg *) ap_get_module_config(f->r->per_dir_config,
-                                             &sedfilter_module);
+                                             &rewrite_filter_module);
     sed_script *script;
 
     mybb = apr_brigade_create(f->r->pool, f->c->bucket_alloc);
@@ -513,7 +513,7 @@ static const char *set_sed_script(cmd_parms *cmd, void *cfg,
 #define PROTO_FLAGS AP_FILTER_PROTO_CHANGE|AP_FILTER_PROTO_CHANGE_LENGTH
 static void register_hooks(apr_pool_t *pool)
 {
-    ap_register_output_filter(sedFilterName, sed_filter, NULL,
+    ap_register_output_filter(rewrite_filter_name, sed_filter, NULL,
                               AP_FTYPE_RESOURCE);
 }
 
@@ -523,7 +523,7 @@ static const command_rec sed_filter_cmds[] = {
     {NULL}
 };
 
-module AP_MODULE_DECLARE_DATA sedfilter_module = {
+module AP_MODULE_DECLARE_DATA rewrite_filter_module = {
     STANDARD20_MODULE_STUFF,
     create_sed_dcfg,            /* dir config creater */
     merge_sed_dcfg,             /* dir merger --- default is to override */