]> granicus.if.org Git - apache/commitdiff
Change r->filters to r->output_filters. This sets things up for us to
authorRyan Bloom <rbb@apache.org>
Mon, 18 Sep 2000 01:24:55 +0000 (01:24 +0000)
committerRyan Bloom <rbb@apache.org>
Mon, 18 Sep 2000 01:24:55 +0000 (01:24 +0000)
put input filters into Apache.

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

include/httpd.h
modules/generators/mod_cgi.c
modules/generators/mod_cgid.c
modules/http/http_core.c
modules/http/http_protocol.c
modules/http/http_request.c
server/util_filter.c

index f3f0492a2eb9a0ecb1347c2703b920079651f732..73eb089e6a07b84fda57cce58f618120b0eac798 100644 (file)
@@ -808,10 +808,15 @@ struct request_rec {
     struct ap_rr_xlate *rrx;
 #endif /*APACHE_XLATE*/
 
-    /** A list of filters to be used for this request 
+    /** A list of output filters to be used for this request 
      *  @defvar ap_filter_t *filters */
-    struct ap_filter_t *filters;
+    struct ap_filter_t *output_filters;
+    /** A flag to determine if the eos bucket has been sent yet
+     *  @defvar int eos_sent */
     int eos_sent;
+    /** A list of output filters to be used for this request 
+     *  @defvar ap_filter_t *filters */
+    struct ap_filter_t *input_filters;
 
 /* Things placed at the end of the record to avoid breaking binary
  * compatibility.  It would be nice to remember to reorder the entire
index b8cc3c1124597ac8da7aee0216bf17f889dbecae..6a02344a4f20e3d1b326fc26e48d8e01419a335c 100644 (file)
@@ -661,7 +661,7 @@ static int cgi_handler(request_rec *r)
            AP_BRIGADE_INSERT_TAIL(bb, b);
             b = ap_bucket_create_eos();
            AP_BRIGADE_INSERT_TAIL(bb, b);
-           ap_pass_brigade(r->filters, bb);
+           ap_pass_brigade(r->output_filters, bb);
        }
 
         log_script_err(r, script_err);
@@ -674,7 +674,7 @@ static int cgi_handler(request_rec *r)
        AP_BRIGADE_INSERT_TAIL(bb, b);
        b = ap_bucket_create_eos();
        AP_BRIGADE_INSERT_TAIL(bb, b);
-        ap_pass_brigade(r->filters, bb);
+        ap_pass_brigade(r->output_filters, bb);
     }
 
     return OK;                 /* NOT r->status, even if it has changed. */
index 690f07d7d81a78e9c7e6a970f1d481a68a58c5b9..d09249e983848d29690cdde89d3cc36b6d5b4605 100644 (file)
@@ -1014,7 +1014,7 @@ static int cgid_handler(request_rec *r)
             AP_BRIGADE_INSERT_TAIL(bb, b);
             b = ap_bucket_create_eos();
             AP_BRIGADE_INSERT_TAIL(bb, b);
-            ap_pass_brigade(r->filters, bb);
+            ap_pass_brigade(r->output_filters, bb);
         } 
     } 
 
@@ -1024,7 +1024,7 @@ static int cgid_handler(request_rec *r)
         AP_BRIGADE_INSERT_TAIL(bb, b);
         b = ap_bucket_create_eos();
         AP_BRIGADE_INSERT_TAIL(bb, b);
-        ap_pass_brigade(r->filters, bb);
+        ap_pass_brigade(r->output_filters, bb);
     } 
 
     apr_close(tempsock);
index 18eff8d393dcc3adc1de930c4ea24f46fb5f1958..63082553ec4de0114e3d1bbe3706ea11ee55629a 100644 (file)
@@ -186,7 +186,7 @@ static void *create_core_dir_config(apr_pool_t *a, char *dir)
     conf->add_default_charset = ADD_DEFAULT_CHARSET_UNSET;
     conf->add_default_charset_name = DEFAULT_ADD_DEFAULT_CHARSET_NAME;
 
-    conf->filters = apr_make_array(a, 40, sizeof(void *));
+    conf->filters = apr_make_array(a, 2, sizeof(void *));
     return (void *)conf;
 }
 
index 3438cf7f4c63cd63debfb95b70590856ba1b3e90..e7cc8f0a862ab09f40816c5ca50337e15aadb860 100644 (file)
@@ -1358,7 +1358,7 @@ static void end_output_stream(request_rec *r)
     bb = ap_brigade_create(r->pool);
     b = ap_bucket_create_eos();
     AP_BRIGADE_INSERT_TAIL(bb, b);
-    ap_pass_brigade(r->filters, bb);
+    ap_pass_brigade(r->output_filters, bb);
 }
 
 void ap_finalize_sub_req_protocol(request_rec *sub)
@@ -2742,7 +2742,7 @@ API_EXPORT(size_t) ap_send_mmap(apr_mmap_t *mm, request_rec *r, size_t offset,
     bb = ap_brigade_create(r->pool);
     b = ap_bucket_create_mmap(mm, 0, mm->size);
     AP_BRIGADE_INSERT_TAIL(bb, b);
-    ap_pass_brigade(r->filters, bb);
+    ap_pass_brigade(r->output_filters, bb);
 
     return mm->size; /* XXX - change API to report apr_status_t? */
 }
@@ -2761,7 +2761,7 @@ API_EXPORT(int) ap_rputc(int c, request_rec *r)
     bb = ap_brigade_create(r->pool);
     b = ap_bucket_create_transient(&c2, 1);
     AP_BRIGADE_INSERT_TAIL(bb, b);
-    ap_pass_brigade(r->filters, bb);
+    ap_pass_brigade(r->output_filters, bb);
 
     return c;
 }
@@ -2781,7 +2781,7 @@ API_EXPORT(int) ap_rputs(const char *str, request_rec *r)
     bb = ap_brigade_create(r->pool);
     b = ap_bucket_create_transient(str, len);
     AP_BRIGADE_INSERT_TAIL(bb, b);
-    ap_pass_brigade(r->filters, bb);
+    ap_pass_brigade(r->output_filters, bb);
 
     return len;
 }
@@ -2799,7 +2799,7 @@ API_EXPORT(int) ap_rwrite(const void *buf, int nbyte, request_rec *r)
     bb = ap_brigade_create(r->pool);
     b = ap_bucket_create_transient(buf, nbyte);
     AP_BRIGADE_INSERT_TAIL(bb, b);
-    ap_pass_brigade(r->filters, bb);
+    ap_pass_brigade(r->output_filters, bb);
     return nbyte;
 }
 
@@ -2814,7 +2814,7 @@ API_EXPORT(int) ap_vrprintf(request_rec *r, const char *fmt, va_list va)
     bb = ap_brigade_create(r->pool);
     written = ap_brigade_vprintf(bb, fmt, va);
     if (written != 0)
-        ap_pass_brigade(r->filters, bb);
+        ap_pass_brigade(r->output_filters, bb);
     return written;
 }
 
@@ -2849,7 +2849,7 @@ API_EXPORT_NONSTD(int) ap_rvputs(request_rec *r, ...)
     written = ap_brigade_vputstrs(bb, va);
     va_end(va);
     if (written != 0)
-        ap_pass_brigade(r->filters, bb);
+        ap_pass_brigade(r->output_filters, bb);
     return written;
 }
 
index 72d7764f066c0c44931e29b2861f897245786a0f..a4b2fcfb08395a21a6f4ced1a9722dd35a862928 100644 (file)
@@ -778,7 +778,7 @@ API_EXPORT(request_rec *) ap_sub_req_method_uri(const char *method,
     ap_copy_method_list(rnew->allowed_methods, r->allowed_methods);
 
     /* start with the same set of output filters */
-    rnew->filters = r->filters;
+    rnew->output_filters = r->output_filters;
 
     ap_set_sub_req_protocol(rnew, r);
 
@@ -873,7 +873,7 @@ API_EXPORT(request_rec *) ap_sub_req_lookup_file(const char *new_file,
     ap_copy_method_list(rnew->allowed_methods, r->allowed_methods);
 
     /* start with the same set of output filters */
-    rnew->filters = r->filters;
+    rnew->output_filters = r->output_filters;
 
     ap_set_sub_req_protocol(rnew, r);
     fdir = ap_make_dirstr_parent(rnew->pool, r->filename);
index ce949a83267aba5940963b3e7735c36ffba5a565..6fbd18368a95725def3efe3f4d0b25d5622762fd 100644 (file)
@@ -111,12 +111,12 @@ API_EXPORT(void) ap_add_filter(const char *name, void *ctx, request_rec *r)
             f->ctx = ctx;
             f->r = r;
 
-            if (INSERT_BEFORE(f, r->filters)) {
-                f->next = r->filters;
-                r->filters = f;
+            if (INSERT_BEFORE(f, r->output_filters)) {
+                f->next = r->output_filters;
+                r->output_filters = f;
             }
             else {
-                ap_filter_t *fscan = r->filters;
+                ap_filter_t *fscan = r->output_filters;
                 while (!INSERT_BEFORE(f, fscan->next))
                     fscan = fscan->next;
                 f->next = fscan->next;
@@ -131,7 +131,7 @@ API_EXPORT(void) ap_add_filter(const char *name, void *ctx, request_rec *r)
 /* Pass the buckets to the next filter in the filter stack.  If the
  * current filter is a handler, we should get NULL passed in instead of
  * the current filter.  At that point, we can just call the first filter in
- * the stack, or r->filters.
+ * the stack, or r->output_filters.
  */
 API_EXPORT(apr_status_t) ap_pass_brigade(ap_filter_t *next, ap_bucket_brigade *bb)
 {