Hi. I have a custom module that generates its output on the fly. (Consider a hypothetical "download.cgi" or "download.php", but it's a module, not script). I don't process the range headers myself. I just write the whole data using ap_rwrite(). If the client performs a ranged request, the byterange filter discards some of my output and sends a correct multipart response.
However, it's inefficient to serve huge virtual files this way when only a small part of such file requested. How to solve this?