it possible to wipe out the entire filter chain. and then when
ap_finalize_request_protocol was called, r->output_filters was NULL,
preventing data from being flushed to the client.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@90801
13f79535-47bb-0310-9956-
ffa450edef68
ap_filter_t **c_filt)
{
ap_filter_t **curr = r_filt ? r_filt : c_filt;
+ ap_filter_t *fscan = *curr;
- if ((*curr) == f) {
- if (f->r) {
- f->r->output_filters = f->r->output_filters->next;
- }
- else {
- f->c->output_filters = f->c->output_filters->next;
- }
+ if (*curr == f) {
+ *curr = (*curr)->next;
return;
}
- while ((*curr) && (*curr)->next != f) {
- (*curr) = (*curr)->next;
- }
- if ((*curr) == NULL) {
- return;
+ while (fscan->next != f) {
+ if (!(fscan = fscan->next)) {
+ return;
+ }
}
- (*curr)->next = f->next;
+
+ fscan->next = f->next;
}
AP_DECLARE(void) ap_remove_input_filter(ap_filter_t *f)