On Tue, 2002-10-15 at 22:09, Bojan Smojver wrote: > I have submitted the patch along those lines a few days back, which also > includes an MMN bump. In the light of the latest discussions on the list, it > seems that a patch like that is not being looked at favourably by many people :-(
The MMN bump in this case is no problem. Your patch just adds fields at the end of the structure. It's backward compatible, so it only needs an increase in the MMN minor number, not the major number. If the patch added fields in the middle of the struct, thus breaking binary compatibility, then it would be a problem. > Do you want me to rework that patch so it uses a privata data structure (to > avoid MMN bump) rather then two new fields in conn_rec? Or is the quality of the > patch unacceptable in general? I've only had a couple of minutes to look at the patch (too busy with my day job this week), but I think the basic problem with the patch is that you're updating the bytes-sent field in the conn_rec after the writes complete in the core_output_filter, but you're reading that field in a logger function. But the logger function can be called *before* the socket write happens. When handling keep-alive requests, for example, the server may buffer up a small response to one request but not send it until the next response is generated. The first request gets logged as soon as all the response data is sent to core_output filter, so the mod_logio logging code might find that the bytes-sent value in the conn_rec is zero because the socket write hasn't actually happened yet. The best solution is to delay the logging until after the response has actually been sent. This would require more significant changes to the server, though. Most of the data that the logger needs is in the request's pool. Currently, this pool is cleared as soon as we send the response to the core_output_filter and log it. In order to accurately log the bytes sent, we'd have to keep the request pool around until the last of the that request's response data was written. That's not impossible, but it would require some design changes to the httpd core and the output filters. IMHO, that's a good example of a worthwhile design change to make for 2.1. Brian