httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <...@covalent.net>
Subject Re: cvs commit: httpd-2.0/modules/http http_request.c
Date Fri, 01 Jun 2001 18:18:12 GMT
On Fri, 1 Jun 2001, Graham Leggett wrote:

> rbb@covalent.net wrote:
>
> > This could be made MUCH simpler by just changing reset_filters to:
> >
> > 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.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Mime
View raw message