httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: cvs commit: apache-2.0/src/main http_core.c
Date Tue, 17 Oct 2000 14:32:14 GMT

I am assuming at this point that we are talking about the brigade used by
ap_get_client_block, not the filter list that Jeff was changing in the

> > It seems that the filter
> > lists and ap_get_client_block()'s brigade need to be in
> > r->request_config instead of r->per_dir_config.
> It has nothing to do with configs. Why not fields in request_rec?

Because this isn't general data.  This data is only valid for
ap_get_client_block, and adding it to the request_rec is just wrong.  That
opens the brigade up fo anybody to get to.

> If the desire is to keep the information relatively private (e.g. avoid
> r->remaining or some such), then introduce "struct http_parse_ctx" and put a
> pointer in the request. Hold the HTTP parsing and chunking info in there,
> and keep the structure private to http_protocol.c

No.  Putting information that is only relevant to one function in the
request_rec is wrong.  It exposes private information that shouldn't be
exposed.  Putting a field in the request_rec that is only valid in one
file is also wrong.  That is a public structure and everything in it
should be available to everybody.  The only exception to that, is the
vector of module specific data.  Creating a new private structure and
putting that in a public structure is just wrong.  As it happens, the core
is not the first module to have this problem, namely we have data that is
not public information, but we have no place to put it.

Take a look at mod_include, mod_file_cache, and mod_auth_digest.  All of
those use the request_config structure in the request_rec for this kind of
information.  That is defined as being "notes on *this* request".  I know
I am the person who suggested the core_dir_config.  After looking closer,
this should probably have been the request_config structure for the
core.  This requires a new structure, but that structure should not be
linked directly off the request_rec.


Ryan Bloom               
406 29th St.
San Francisco, CA 94131

View raw message