Small patch to add the byte counts from mod_logio to r->notes for pickup in other modules. It adds a hook to do this at the start of the order and moves the logio_transaction, which clears the data, to the end. For myself this data is extremely useful with mod_ruby and I expect would be for others in mod_perl, mod_python etc. This would also hopefully solve issues like outoforder.cc mod_log_sql having to include their own replacement version of mod_logio. Question though: should this be an option? Perhaps allowing users to chose the name of the notes like mod_deflate? Willing to revise based on feedback. Thanks.
Created attachment 20373 [details] adds notes with byte counts
Another option would be to change the optional function into a hook so that multiple modules can hook into the data. I am currently writing a quota module that needs to know how much was ACTUALLY sent out verses what the total size of the file is. So I am finding multiple modules on outoforder.cc needing to access this data and a clean solution would be so useful. I'm going to try and add in an optional hook implementation and attach a patch up here.
Created attachment 21335 [details] Add in an optional hook along side optional function. This patch adds an optinal hook implementation so that multiple modules can hook into the bytes out functionality. I've also updated mod_logio to make use of this hook. *NOTE* I left the optional function in place so that compatability can be maintained with old modules.. Also this patch should be able to backport to apache 2.0 and 2.2 w/o issue. Oh, why is there no OPTIONAL_HOOK that will run w/ a function that will return void, Only w/ a return value?? that is the only *odd* change is that I have to return OK from the function now.
Comment on attachment 21335 [details] Add in an optional hook along side optional function. Typos and odd linking issue that shouldn't occur.. ignore until I can fix it.
Created attachment 21342 [details] Updated patch Updated tested patch from SVN trunk