You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@apache.org on 2002/03/07 03:09:30 UTC
cvs commit: httpd-2.0/server core.c protocol.c request.c util_filter.c
rbb 02/03/06 18:09:30
Modified: include util_filter.h
server core.c protocol.c request.c util_filter.c
Log:
Remove the prev pointer from the filter chain. This removes
the complexity of trying to set the filter chain correctly, with the
side-effect of forcing us to walk the entire chain whenever we add
a filter. Since the filter chains are small, the decrease in
complexity is worth it.
Reviewed by: Allan Edwards
Revision Changes Path
1.68 +0 -3 httpd-2.0/include/util_filter.h
Index: util_filter.h
===================================================================
RCS file: /home/cvs/httpd-2.0/include/util_filter.h,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- util_filter.h 3 Mar 2002 06:04:08 -0000 1.67
+++ util_filter.h 7 Mar 2002 02:09:30 -0000 1.68
@@ -263,9 +263,6 @@
/** The next filter in the chain */
ap_filter_t *next;
- /** The previous filter in the chain */
- ap_filter_t *prev;
-
/** The request_rec associated with the current filter. If a sub-request
* adds filters, then the sub-request is the request associated with the
* filter.
1.160 +1 -1 httpd-2.0/server/core.c
Index: core.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/core.c,v
retrieving revision 1.159
retrieving revision 1.160
diff -u -r1.159 -r1.160
--- core.c 6 Mar 2002 18:03:19 -0000 1.159
+++ core.c 7 Mar 2002 02:09:30 -0000 1.160
@@ -4040,7 +4040,7 @@
AP_FTYPE_NETWORK);
ap_subreq_core_filter_handle =
ap_register_output_filter("SUBREQ_CORE", ap_sub_req_output_filter,
- AP_FTYPE_HTTP_HEADER);
+ AP_FTYPE_CONTENT + 5);
ap_old_write_func = ap_register_output_filter("OLD_WRITE",
ap_old_write_filter, AP_FTYPE_CONTENT - 10);
}
1.88 +0 -3 httpd-2.0/server/protocol.c
Index: protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
retrieving revision 1.87
retrieving revision 1.88
diff -u -r1.87 -r1.88
--- protocol.c 3 Mar 2002 22:04:03 -0000 1.87
+++ protocol.c 7 Mar 2002 02:09:30 -0000 1.88
@@ -777,9 +777,6 @@
r->request_config = ap_create_request_config(r->pool);
/* Must be set before we run create request hook */
- conn->output_filters->prev = NULL;
- conn->input_filters->prev = NULL;
-
r->proto_output_filters = conn->output_filters;
r->output_filters = r->proto_output_filters;
r->proto_input_filters = conn->input_filters;
1.103 +1 -1 httpd-2.0/server/request.c
Index: request.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/request.c,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -r1.102 -r1.103
--- request.c 5 Mar 2002 05:24:21 -0000 1.102
+++ request.c 7 Mar 2002 02:09:30 -0000 1.103
@@ -1499,7 +1499,7 @@
rnew->input_filters = r->input_filters;
rnew->proto_input_filters = r->proto_input_filters;
rnew->output_filters = next_filter;
- rnew->proto_output_filters = r->connection->output_filters;
+ rnew->proto_output_filters = r->proto_output_filters;
ap_add_output_filter_handle(ap_subreq_core_filter_handle,
NULL, rnew, rnew->connection);
}
1.86 +2 -12 httpd-2.0/server/util_filter.c
Index: util_filter.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/util_filter.c,v
retrieving revision 1.85
retrieving revision 1.86
diff -u -r1.85 -r1.86
--- util_filter.c 6 Mar 2002 17:29:39 -0000 1.85
+++ util_filter.c 7 Mar 2002 02:09:30 -0000 1.86
@@ -329,7 +329,7 @@
f->ctx = ctx;
f->r = r;
f->c = c;
- f->next = f->prev = NULL;
+ f->next = NULL;
if (INSERT_BEFORE(f, *outf)) {
f->next = *outf;
@@ -351,10 +351,6 @@
}
if (first && first != (*outf)) {
first->next = f;
- f->prev = first;
- }
- if (*outf && ((*outf)->prev == first)) {
- (*outf)->prev = f;
}
}
*outf = f;
@@ -365,11 +361,7 @@
fscan = fscan->next;
f->next = fscan->next;
- if (fscan->next->prev == fscan) {
- f->prev = fscan;
- fscan->next->prev = f;
- fscan->next = f;
- }
+ fscan->next = f;
}
if (frec->ftype < AP_FTYPE_CONNECTION && (*r_filters == *c_filters)) {
@@ -472,7 +464,6 @@
if (*curr == f) {
*curr = (*curr)->next;
- (*curr)->prev = NULL;
return;
}
@@ -483,7 +474,6 @@
}
fscan->next = f->next;
- f->next->prev = fscan;
}
AP_DECLARE(void) ap_remove_input_filter(ap_filter_t *f)