HTTP Accept header can have q=0 quality factor. This indicates that the server should NOT send out that encoding.
Please see patch for tests and possible solution. I will say, however, that I don't particularly like the solution. It's readable, and it works, but it's part of some filtering code that I think could be and should be optimized.
To whomever commits this, please open a followup Jira to optimize that filtering code patch in ResourceRegistry.
If you change the solution significantly, please email me or I'll check the Jira periodically to see if any updated patches were posted. I'm curious to see the solution(s) and learn how I can make your job easier.