summaryrefslogtreecommitdiff
path: root/buckets/register_patch.txt
blob: 07c1ae41bfbbf754f9f0b50f9d45d4bfa2d89d13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
Index: Makefile.in
===================================================================
RCS file: /home/cvs/apache-2.0/src/main/Makefile.in,v
retrieving revision 1.16
diff -u -r1.16 Makefile.in
--- Makefile.in	2000/07/01 14:14:15	1.16
+++ Makefile.in	2000/07/25 00:42:50
@@ -8,7 +8,8 @@
 	http_protocol.c http_request.c http_vhost.c util.c util_date.c \
 	util_script.c util_uri.c util_md5.c util_cfgtree.c util_ebcdic.c \
 	rfc1413.c http_connection.c iol_file.c iol_socket.c listen.c \
-        mpm_common.c util_charset.c util_debug.c util_xml.c
+        mpm_common.c util_charset.c util_debug.c util_xml.c \
+	util_filter.c
 
 include $(top_srcdir)/build/ltlib.mk
 
Index: httpd.h
===================================================================
RCS file: /home/cvs/apache-2.0/src/include/httpd.h,v
retrieving revision 1.64
diff -u -r1.64 httpd.h
--- httpd.h	2000/06/30 21:18:13	1.64
+++ httpd.h	2000/07/25 00:49:52
@@ -731,7 +731,9 @@
 #ifdef APACHE_XLATE
     struct ap_rr_xlate *rrx;
 #endif /*APACHE_XLATE*/
-    
+
+    struct ap_filter_t *filters;
+
 /* Things placed at the end of the record to avoid breaking binary
  * compatibility.  It would be nice to remember to reorder the entire
  * record to improve 64bit alignment the next time we need to break
Index: http_request.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/main/http_request.c,v
retrieving revision 1.35
diff -u -r1.35 http_request.c
--- http_request.c	2000/06/24 17:33:57	1.35
+++ http_request.c	2000/07/25 00:50:35
@@ -769,6 +769,9 @@
     rnew->htaccess       = r->htaccess;
     rnew->per_dir_config = r->server->lookup_defaults;
 
+    /* start with the same set of output filters */
+    rnew->filters = r->filters;
+
     ap_set_sub_req_protocol(rnew, r);
 
     /* would be nicer to pass "method" to ap_set_sub_req_protocol */
@@ -857,6 +860,9 @@
     rnew->htaccess       = r->htaccess;
     rnew->chunked        = r->chunked;
 
+    /* start with the same set of output filters */
+    rnew->filters = r->filters;
+
     ap_set_sub_req_protocol(rnew, r);
     fdir = ap_make_dirstr_parent(rnew->pool, r->filename);
 
@@ -960,16 +966,22 @@
 
 API_EXPORT(int) ap_run_sub_req(request_rec *r)
 {
-#ifndef APACHE_XLATE
-    int retval = ap_invoke_handler(r);
-#else /*APACHE_XLATE*/
-    /* Save the output conversion setting of the caller across subrequests */
     int retval;
-    ap_xlate_t *saved_xlate;
 
-    ap_bgetopt(r->connection->client, BO_WXLATE, &saved_xlate);
-    retval  = ap_invoke_handler(r);
-    ap_bsetopt(r->connection->client, BO_WXLATE, &saved_xlate);
+    /* see comments in process_request_internal() */
+    ap_run_insert_filter(r);
+
+#ifndef APACHE_XLATE
+    retval = ap_invoke_handler(r);
+#else /*APACHE_XLATE*/
+    {
+        /* Save the output conversion setting across subrequests */
+        ap_xlate_t *saved_xlate;
+
+        ap_bgetopt(r->connection->client, BO_WXLATE, &saved_xlate);
+        retval  = ap_invoke_handler(r);
+        ap_bsetopt(r->connection->client, BO_WXLATE, &saved_xlate);
+    }
 #endif /*APACHE_XLATE*/
     ap_finalize_sub_req_protocol(r);
     return retval;
Index: http_protocol.c
===================================================================
RCS file: /home/cvs/apache-2.0/src/main/http_protocol.c,v
retrieving revision 1.97
diff -u -r1.97 http_protocol.c
--- http_protocol.c	2000/07/21 19:50:47	1.97
+++ http_protocol.c	2000/07/25 11:47:14
@@ -1278,8 +1278,19 @@
     rnew->main = (request_rec *) r;
 }
 
+static void end_output_stream(request_rec *r)
+{
+    /*
+    ** ### place holder to tell filters that no more content will be
+    ** ### arriving. typically, they will flush any pending content
+    */
+}
+
 void ap_finalize_sub_req_protocol(request_rec *sub)
 {
+    /* tell the filter chain there is no more content coming */
+    end_output_stream(sub);
+
     SET_BYTES_SENT(sub->main);
 }
 
@@ -1833,11 +1844,6 @@
 #endif /*APACHE_XLATE*/
 }
 
-static void flush_filters(request_rec *r)
-{
-    /* ### place holder to flush pending content through the filters */
-}
-
 /* finalize_request_protocol is called at completion of sending the
  * response.  It's sole purpose is to send the terminating protocol
  * information for any wrappers around the response message body
@@ -1845,7 +1851,8 @@
  */
 API_EXPORT(void) ap_finalize_request_protocol(request_rec *r)
 {
-    flush_filters(r);
+    /* tell the filter chain there is no more content coming */
+    end_output_stream(r);
 
     if (r->chunked && !r->connection->aborted) {
 #ifdef APACHE_XLATE