httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Trawick <>
Subject Re: FW: cvs commit: apache-2.0/src/main http_core.c http_protocol.chttp_request.c
Date Wed, 04 Oct 2000 18:05:08 GMT writes:

> > What if installing core_filter is associated with initializing the
> > conn_rec structure (perhaps in a hook called right after creating the
> > conn_rec)...  
> > 
> > . conn_rec needs an output filter list
> > . when the request_rec is initialized for a new request it starts off
> >   with the chain on the conn_rec
> > . ap_add_filter() (which needs to be renamed to ap_add_output_filter()
> >   anyway) would need to take the address of the list head
> >   (&c->output_filters or &r->output_filters) to be modified
> > 
> > What am I missing here?
> Nothing.  I actually just had this conversation and was about to post
> about it.  I would modify a few things though.
> 1)  Remove the output filters from the request_rec.  They may be request
> oriented, but we only support one request at a time.

See below...

> 2)  When adding a filter, we provide a request_rec and a conn_rec.  Any
> filter that does not have a request_rec is automatically connection
> oriented.

Cool...  I forgot that ap_add_filter() needs the r (if applicable) so
that it can set f->r.

> 3)  At the end of a request, clear all filters from the conn_rec, except
> the connection oriented ones.

What about subrequests?  Hanging the filter list off of the r works
very nicely for subrequests.  Having one filter list hanging off the c
means that at the end of a subrequest we have another cleanup
operation.  What about redirects?  There is another cleanup operation. 

What does having separate lists hurt?  Saving a pointer in the r?  In
return we save code (and pathlength).

Jeff Trawick | | PGP public key at web site:
          Born in Roswell... married an alien...

View raw message