httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Graham Leggett <minf...@sharp.fm>
Subject Re: cvs commit: httpd-2.0/modules/http http_request.c
Date Fri, 01 Jun 2001 17:31:02 GMT
rbb@covalent.net wrote:

> > > void reset_filters(r)
> > > {
> > >     ap_filter_t *f = r->output_filters;
> > >     int has_core = 0, has_content = 0, has_http_header = 0;
> > >     while (f) {
> > >         ap_filter_t *f2 = f->next;
> > >         ap_remove_filter(f);
> > >         f = f2;
> > >     }
> > >     ap_add_output_filter("CORE", NULL, r, r->connection);
> > >     ap_add_output_filter("CONTENT_LENGTH", NULL, r, r->connection);
> > >     ap_add_output_filter("HTTP_HEADER", NULL, r, r->connection);
> > > }
> >
> > Won't this cause a problem if one of these basic filters threw the error
> > in the first place - when the filter was thrown away (and replaced) the
> > context would be thrown away too. Would this be a problem, or am I
> > missing something?
> 
> The error is completely owned by the stuff in the request_rec by now.
> There shouldn't be anything in any of these three filters that is saved in
> the context pointer that we actually need to send out a valid error
> response.  Remember, that those filters are storing information about the
> valid response, once we find an error we basically have a completely
> different response that we are sending, and any old information in the
> filter is invalid.

Ok - so to sum up basically reset_filters() should remove all filters
from the stack, then add the three minimal basic filters, and run with
it from there...?

Regards,
Graham
-- 
-----------------------------------------
minfrin@sharp.fm		"There's a moon
					over Bourbon Street
						tonight..."
Mime
View raw message