my silly build script
Apache httpd 2.4 module-specific log level support

With this tiny change:

1) error log messages will show "qos" for the source of the
   message
2) "qos" can be used to configure a mod_qos-specific log level
make functions static to get rid of 'no previous prototype' warnings

I normally build httpd with "--enable-maintainer-mode", which turns
on a number of extra lints in gcc.
strchr/strstr const goodness

strchr/strstr are dangerous in that they take a const char *
as input but give a non-const char * (writable) pointer into
the const string

when building httpd/modules in maintainer mode, httpd remaps
these functions into variants that preserve (or not) const-ness
in a suitable manner

these simple changes accommodate the safe, httpd versions of
the functions

(there's no problem with the original code, of course; this
is just a matter of quieting warnings so that real problems
can be noticed)
disable unused code to quiet the last of the maintainer mode warnings
QS_EventNewKbytesPerSecLimit - reimplementation of bandwidth use per event

This is a duplicate implementation of QS_EventKbytesPerSecLimit that
appears to be much more accurate and smooth.  I.e., no long periods
of sending relatively unlimited data followed by long periods of
large delays between sleeps.

Additionally:

1. It breaks up large input brigades to ensure effectiveness
2. It takes effect before the first matching request finishes
   and reacts during the sending of any response.

How well does it work?

For a simple test with very large responses and multiple clients,
behavior is very smooth, very close to configured limit.

There's some bouncing around of bandwidth use with files that
are much smaller relative to the bandwidth limit.

In either case, inaccuracy is introduced when the number of
requests for the event changes during a particular 1/4 second.

TBD:

How to smooth out the bandwidth for concurrent requests
of different types (small/large) without making the code significantly
more complicated.

Consider whether my real requirement is to limit bandwidth
only for large responses (e.g., ignore typical html/css/whatever
and just limit downloads of very large objects), which in turn
avoids the worst effects seen so far.