Part of this is partially done in my parse_accept_encoding branch. That only handles the parsing: it doesn't actually do anything with compression types other than deflate. I'll add some tests for it when I get back to it.
I'm missing two essentials: lift my usage of srv_meth_pref_precompressed into a separate constant and deny LZMA during request negotiation for the dynamic endpoints. I'll add these changes as fixups.
I added some comments there, but one thing I don't understand -- when does this ever actually serve compressed consensus documents correctly? It changes streaming compression, but it doesn't serve the right spooled_resource_t objects for cached consensuses. Is that coming in a separate commit?
That will arrive in a separate commit; working on that right now while having pulled your changes from the compress_consensus_more_ways branch in.
Do you agree on having a variable like srv_meth_pref_precompressed where we define the available order, excluding LZMA, for non-precompressed documents?
Currently tracing a bug when running this code in chutney where we initially receive a ZLIB compressed object, which we claim is compressed with LZMA.
One of the patches contains a new API in consdiff manager to query metadata around a consensus document. These new functions are currently just stubs as per discussion on IRC tonight.
I have made a branch 21667_2_plus in my public repository to fill in the blank API functions. I also had to change them a bit; I made corresponding changes to the callers. Untested; sorry!
Patch to fix test execution landed. Not exactly as per the instructions since a lot of the code in handle_get_current_consensus() does various NULL checks for cached_consensus, so we need to inject a consensus anyway - unless I'm overseeing something.