httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject Re: Counting bytes_sent in core output_filter Re: [PATCH: Apache 2.0] mod_log_config: input/output bytes
Date Wed, 21 Aug 2002 22:40:16 GMT

> >>c->bytes_sent?  Did you mean r->bytes_sent?  The conn_rec doesn't
> >>have a byte count.
> >>    
> >>
> >
> >Yeah, sorry.
> >  
> >
> Okay, now I'm less confused. :-)  But we still have the problem of
> updating r->bytes_sent from the core output filter, given that we
> don't have access to r.  Do you have any ideas on that (other than
> storing metadata in the brigade to associate buckets with requests)?

Sorry, I assumed that value was in the conn_rec, becasue we are talking
about the core_output_filter.  Of course, it isn't, which makes this a lot
harder to do.  

The cleanest solution, is to move the bytes_sent to the conn_rec, but then
it should really be per-connection, not per-request,  and we want it to be

The other solution is to have the core figure out the correct amount of
data in the core_output_filter, and then fill out the request_rec in a
later hook, but that is also kind of bogus.

Adding the request_rec to the bucket is a bad idea, because currently
buckets have no concept of Apache internals, and I would prefer that they
stay that way.

Adding the request_rec to the CONNECTION filters is also a bad idea,
because those filters really shouldn't _need_ anything from the request,
and connections don't always have requests, especially not in all

IMO, the best solution is to move the bytes_sent information to the
conn_rec, and have the protocol module reset it whenever it wants to.  For
backwards compat, it would be REALLY cool, if the r->bytes_sent could be
linked to c->bytes_sent, but it can't, so oh well.


Ryan Bloom               
550 Jean St
Oakland CA 94610

View raw message