(didn't realise a "reply to author" doesn't reply to the mailing list, that sucks)
Hmm, I thought I added another reply to this. Must have closed the tab without saving? Anyway, by leveraging rack-accept a little further I'm now re-ordering matched mappings based on their `media_type` condition, in addition to their priority and definition order which I was already doing. For mappings of the same priority, the better matching mapping as far as media type is concerned, will be invoked first.
`rack-accept` doesn't provide the best facilities for doing this properly though. For example, the HTTP spec states that where q-value's are the same, the more specific media type should win (i.e a match against `application/json` should win over a match against `application/*`), or where specificity is the same, the first media type listed should win. `rack-accept` doesn't help us in this respect, so it really only get's us half of the way there.
I've spent some time looking at patching/extending `rack-accept`, but it's in dire need of a refactor in my opinion, so it's a matter of either now worrying about it, or re-writing/refactoring `rack-accept`.