]> granicus.if.org Git - apache/commitdiff
Now that we have ap_add_input_filter(), rename ap_add_filter() to
authorJeff Trawick <trawick@apache.org>
Thu, 5 Oct 2000 12:01:48 +0000 (12:01 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 5 Oct 2000 12:01:48 +0000 (12:01 +0000)
ap_add_output_filter().

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

include/util_filter.h
modules/experimental/mod_charset_lite.c
modules/http/http_core.c
modules/http/http_protocol.c
server/connection.c
server/util_filter.c

index 2b4f760590ee8b75b79b3634697feda83501d8d9..ea0e447e33ba4578c769a8fae03d43107ab799a2 100644 (file)
@@ -149,7 +149,7 @@ typedef apr_status_t (*ap_filter_func)(ap_filter_t *f, ap_bucket_brigade *b);
  *
  * The types have a particular sort order, which allows us to insert them
  * into the filter chain in a determistic order. Within a particular grouping,
- * the ordering is equivalent to the order of calls to ap_add_filter().
+ * the ordering is equivalent to the order of calls to ap_add_*_filter().
  */
 typedef enum {
     AP_FTYPE_CONTENT,
@@ -263,8 +263,8 @@ API_EXPORT(apr_status_t) ap_pass_brigade(ap_filter_t *filter, ap_bucket_brigade
  *
  * This function is used to register an input filter with the system. 
  * After this registration is performed, then a filter may be added 
- * into the filter chain by using ap_add_filter() and simply specifying 
- * the name.
+ * into the filter chain by using ap_add_input_filter() and simply 
+ * specifying the name.
  *
  * The filter's callback and type should be passed.
  */
@@ -284,8 +284,8 @@ API_EXPORT(void) ap_register_input_filter(const char *name,
  *
  * This function is used to register an output filter with the system. 
  * After this registration is performed, then a filter may be added 
- * into the filter chain by using ap_add_filter() and simply specifying 
- * the name.
+ * into the filter chain by using ap_add_output_filter() and simply 
+ * specifying the name.
  *
  * The filter's callback and type should be passed.
  */
@@ -329,11 +329,13 @@ API_EXPORT(void) ap_add_input_filter(const char *name, void *ctx, conn_rec *r);
  * Add a filter to the current request.  Filters are added in a FIFO manner.
  * The first filter added will be the first filter called.
  * @param name The name of the filter to add
- * @param r The request to add this filter for.
- * @deffunc void ap_add_filter(const char *name, request_rec *r)
+ * @param ctx Context data to set in the filter
+ * @param r The request to add this filter for (or NULL if it isn't associated with a request)
+ * @param c The connection to add this filter for
+ * @deffunc void ap_add_output_filter(const char *name, void *ctx, request_rec *r, conn_rec *c)
  */
-API_EXPORT(void) ap_add_filter(const char *name, void *ctx, request_rec *r,
-                               conn_rec *c);
+API_EXPORT(void) ap_add_output_filter(const char *name, void *ctx, 
+                                      request_rec *r, conn_rec *c);
 
 /* The next two filters are for abstraction purposes only.  They could be
  * done away with, but that would require that we break modules if we ever
index 83994fb8e9176958a684660b97ad0a52e44472fc..992c42220dfbc157b77791112071b12837d15a15 100644 (file)
@@ -109,7 +109,8 @@ typedef struct charset_dir_t {
     int debug;
     const char *charset_source; /* source encoding */
     const char *charset_default; /* how to ship on wire */
-    enum {IA_INIT, IA_IMPADD, IA_NOIMPADD} implicit_add; /* tmp hack! module does ap_add_filter()? */
+    /** module does ap_add_*_filter()? */    
+    enum {IA_INIT, IA_IMPADD, IA_NOIMPADD} implicit_add; 
 } charset_dir_t;
 
 /* charset_filter_ctx_t is created for each filter instance; because the same
@@ -366,14 +367,15 @@ static void xlate_insert_filter(request_rec *r)
     if (reqinfo && 
         dc->implicit_add == IA_IMPADD &&
         reqinfo->output_ctx) {
-        ap_add_filter(XLATEOUT_FILTER_NAME, reqinfo->output_ctx, r, r->connection);
+        ap_add_output_filter(XLATEOUT_FILTER_NAME, reqinfo->output_ctx, r, 
+                             r->connection);
     }
     
 #ifdef NOT_YET /* no input filters yet; we still rely on BUFF */
     if (reqinfo && 
         dc->implicit_add == IA_IMPADD &&
         reqinfo->input_ctx) {
-        /* ap_add_filter(XLATEIN_FILTER_NAME, reqinfo->input_ctx, r); */
+        /* ap_add_input_filter(XLATEIN_FILTER_NAME, reqinfo->input_ctx, r); */
     }
 #endif
 }
index 7e5d63f325e60d561fb577ba0656e61d74772d0a..9fe6a97c68cba7317a82143f8ac45f23fed5889d 100644 (file)
@@ -3434,7 +3434,7 @@ static void core_register_filter(request_rec *r)
 
     for (i = 0; i < conf->filters->nelts; i++) {
         char *foobar = items[i];
-        ap_add_filter(foobar, NULL, r, r->connection);
+        ap_add_output_filter(foobar, NULL, r, r->connection);
     }
 }
 
index 639d04b7f4b1b31a07a3631496094b4b7744e818..7ee84088c588f25b50a82ba1e720729beda1cb06 100644 (file)
@@ -2099,8 +2099,8 @@ API_EXPORT(void) ap_send_http_header(request_rec *r)
     if (r->chunked) {
         apr_table_mergen(r->headers_out, "Transfer-Encoding", "chunked");
         apr_table_unset(r->headers_out, "Content-Length");
-        ap_add_filter("BUFFER", NULL, r, r->connection);
-        ap_add_filter("CHUNK", NULL, r, r->connection);
+        ap_add_output_filter("BUFFER", NULL, r, r->connection);
+        ap_add_output_filter("CHUNK", NULL, r, r->connection);
     }
 
     if (r->byterange > 1) {
index 3eb453761fcb1a2c99a81dd5bb86fc05e8d73946..e4dd226eba96cbdfc07e43992676d05e5fad1663 100644 (file)
@@ -217,7 +217,7 @@ CORE_EXPORT(void) ap_process_connection(conn_rec *c)
 int ap_pre_http_connection(conn_rec *c)
 {
     ap_add_input_filter("CORE_IN", NULL, c);
-    ap_add_filter("CORE", NULL, NULL, c);
+    ap_add_output_filter("CORE", NULL, NULL, c);
     return OK;
 }
 
index f95532b6aad74b54809734e2cb5051faa0cc104a..1d26b8e194b669bf771150b693786182d1146a0c 100644 (file)
@@ -148,8 +148,8 @@ API_EXPORT(void) ap_add_input_filter(const char *name, void *ctx, conn_rec *c)
     }
 }
 
-API_EXPORT(void) ap_add_filter(const char *name, void *ctx, request_rec *r,
-                               conn_rec *c)
+API_EXPORT(void) ap_add_output_filter(const char *name, void *ctx, 
+                                      request_rec *r, conn_rec *c)
 {
     ap_filter_rec_t *frec = registered_output_filters;