]> granicus.if.org Git - apache/commitdiff
SEDFILTER has several anomolies; first, it's not SED syntax,
authorWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 24 Aug 2007 00:54:15 +0000 (00:54 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Fri, 24 Aug 2007 00:54:15 +0000 (00:54 +0000)
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

modules/experimental/config.m4
modules/experimental/mod_rewrite_filter.c [moved from modules/experimental/mod_sedfilter.c with 98% similarity]

index ec8693532924ce8ebb7f001ffef5c296149e7a15..8f2dbab944c788b4ed3925c09391028b188aa269 100644 (file)
@@ -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
similarity index 98%
rename from modules/experimental/mod_sedfilter.c
rename to modules/experimental/mod_rewrite_filter.c
index c907a86272046a0a95b2db5f00f5d531cad549e1..d7010decf1a9230ccad83c0bb01a39e8123476ba 100644 (file)
@@ -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 */