httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bojan Smojver <>
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 23:03:49 GMT
On Thu, 2002-08-22 at 08:40, wrote:

> 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
> per-request.
> 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
> protocols.
> 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.

Why don't we just add up the lengths of headers and the status line and
be done with it? It will be accurate, since we know which headers are
being sent out.

As for bytes_read (non-existent now), this would be a bit more


View raw message