@@ -36,6 +36,7 @@ apr_status_t input_filter(ap_filter_t *f, apr_bucket_brigade *bb_out,
36
36
msc_data_chunk * chunk = NULL ;
37
37
apr_bucket * bucket ;
38
38
apr_status_t rc ;
39
+ int no_data = 1 ;
39
40
char * my_error_msg = NULL ;
40
41
41
42
if (msr == NULL ) {
@@ -110,6 +111,7 @@ apr_status_t input_filter(ap_filter_t *f, apr_bucket_brigade *bb_out,
110
111
111
112
if (bucket == NULL ) return APR_EGENERAL ;
112
113
APR_BRIGADE_INSERT_TAIL (bb_out , bucket );
114
+ no_data = 0 ;
113
115
114
116
if (msr -> txcfg -> debuglog_level >= 4 ) {
115
117
msr_log (msr , 4 , "Input filter: Forwarded %" APR_SIZE_T_FMT " bytes." , chunk -> length );
@@ -130,6 +132,7 @@ apr_status_t input_filter(ap_filter_t *f, apr_bucket_brigade *bb_out,
130
132
131
133
if (bucket == NULL ) return APR_EGENERAL ;
132
134
APR_BRIGADE_INSERT_TAIL (bb_out , bucket );
135
+ no_data = 0 ;
133
136
134
137
if (msr -> txcfg -> debuglog_level >= 4 ) {
135
138
msr_log (msr , 4 , "Input stream filter: Forwarded %" APR_SIZE_T_FMT " bytes." , msr -> stream_input_length );
@@ -145,6 +148,7 @@ apr_status_t input_filter(ap_filter_t *f, apr_bucket_brigade *bb_out,
145
148
bucket = apr_bucket_eos_create (f -> r -> connection -> bucket_alloc );
146
149
if (bucket == NULL ) return APR_EGENERAL ;
147
150
APR_BRIGADE_INSERT_TAIL (bb_out , bucket );
151
+ no_data = 0 ;
148
152
149
153
if (msr -> txcfg -> debuglog_level >= 4 ) {
150
154
msr_log (msr , 4 , "Input filter: Sent EOS." );
@@ -158,6 +162,10 @@ apr_status_t input_filter(ap_filter_t *f, apr_bucket_brigade *bb_out,
158
162
if (msr -> txcfg -> debuglog_level >= 4 ) {
159
163
msr_log (msr , 4 , "Input filter: Input forwarding complete." );
160
164
}
165
+
166
+ if (no_data ) {
167
+ return ap_get_brigade (f -> next , bb_out , mode , block , nbytes );
168
+ }
161
169
}
162
170
163
171
return APR_SUCCESS ;
0 commit comments