httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@locus.apache.org
Subject cvs commit: apache-2.0/src/main http_core.c http_protocol.c util_filter.c
Date Wed, 30 Aug 2000 01:09:16 GMT
gstein      00/08/29 18:09:15

  Modified:    src/include util_filter.h
               src/main http_core.c http_protocol.c util_filter.c
  Log:
  reversing the latest commit; it was vetoed a while back.
  
  Revision  Changes    Path
  1.13      +5 -11     apache-2.0/src/include/util_filter.h
  
  Index: util_filter.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/util_filter.h,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- util_filter.h	2000/08/29 22:16:44	1.12
  +++ util_filter.h	2000/08/30 01:08:58	1.13
  @@ -255,24 +255,18 @@
    * from another request, then this filter will be added before those other
    * filters.
    * 
  - * To re-iterate that last comment.  This function is building a LIFO
  + * To re-iterate that last comment.  This function is building a FIFO
    * list of filters.  Take note of that when adding your filter to the chain.
    */
   /**
  - * Add a filter to the current request.  Filters are added in a LIFO manner.
  - * The first filter added will be the last filter called.
  + * 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 ctx Any filter specific data to associate with the filter
    * @param r The request to add this filter for.
  - * @param curr The filter to add this filter after.  This is incredibly useful
  - *             if you are adding a filter while executing another filter.  The
  - *             new filter should be added immediately after the current filter.
  - *             By passing the current filter into ap_add_filter, this is
  - *             accomplished easily.
  - * @deffunc void ap_add_filter(const char *name, void *ctx, request_rec *r, ap_filter_t
*curr)
  + * @deffunc void ap_add_filter(const char *name, void *ctx, request_rec *r)
    */
  -API_EXPORT(void) ap_add_filter(const char *name, void *ctx, request_rec *r,
  -                               ap_filter_t *curr);
  +API_EXPORT(void) ap_add_filter(const char *name, void *ctx, request_rec *r);
   
   /* 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
  
  
  
  1.111     +2 -2      apache-2.0/src/main/http_core.c
  
  Index: http_core.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_core.c,v
  retrieving revision 1.110
  retrieving revision 1.111
  diff -u -r1.110 -r1.111
  --- http_core.c	2000/08/29 22:16:44	1.110
  +++ http_core.c	2000/08/30 01:09:02	1.111
  @@ -3089,7 +3089,7 @@
   
   static void core_register_filter(request_rec *r)
   {
  -    ap_add_filter("CORE", NULL, r, NULL);
  +    ap_add_filter("CORE", NULL, r);
   }
   
   static void register_hooks(void)
  @@ -3109,7 +3109,7 @@
        * request-processing time.
        */
       ap_hook_insert_filter(core_register_filter, NULL, NULL, AP_HOOK_MIDDLE);
  -    ap_register_filter("CORE", core_filter, AP_FTYPE_CONNECTION);
  +    ap_register_filter("CORE", core_filter, AP_FTYPE_CONNECTION + 1);
       ap_register_filter("CHUNK", chunk_filter, AP_FTYPE_CONNECTION);
   }
   
  
  
  
  1.118     +1 -1      apache-2.0/src/main/http_protocol.c
  
  Index: http_protocol.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
  retrieving revision 1.117
  retrieving revision 1.118
  diff -u -r1.117 -r1.118
  --- http_protocol.c	2000/08/29 22:16:45	1.117
  +++ http_protocol.c	2000/08/30 01:09:03	1.118
  @@ -1862,7 +1862,7 @@
       if (r->chunked) {
           apr_table_mergen(r->headers_out, "Transfer-Encoding", "chunked");
           apr_table_unset(r->headers_out, "Content-Length");
  -        ap_add_filter("CHUNK", NULL, r, NULL);
  +        ap_add_filter("CHUNK", NULL, r);
       }
   
       if (r->byterange > 1)
  
  
  
  1.12      +10 -7     apache-2.0/src/main/util_filter.c
  
  Index: util_filter.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/main/util_filter.c,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- util_filter.c	2000/08/29 22:16:45	1.11
  +++ util_filter.c	2000/08/30 01:09:09	1.12
  @@ -117,8 +117,7 @@
       apr_register_cleanup(FILTER_POOL, NULL, filter_cleanup, apr_null_cleanup);
   }
   
  -API_EXPORT(void) ap_add_filter(const char *name, void *ctx, request_rec *r,
  -                               ap_filter_t *curr)
  +API_EXPORT(void) ap_add_filter(const char *name, void *ctx, request_rec *r)
   {
       ap_filter_rec_t *frec = registered_filters;
   
  @@ -131,14 +130,18 @@
               f->ftype = frec->ftype;
               f->r = r;
   
  -            if (curr) {
  -                f->next = curr->next;
  -                curr->next = f;
  -            }
  -            else {
  +            if (INSERT_BEFORE(f, r->filters)) {
                   f->next = r->filters;
                   r->filters = f;
               }
  +            else {
  +                ap_filter_t *fscan = r->filters;
  +                while (!INSERT_BEFORE(f, fscan->next))
  +                    fscan = fscan->next;
  +                f->next = fscan->next;
  +                fscan->next = f;
  +            }
  +
               break;
           }
       }
  
  
  

Mime
View raw message