I'd like to see this. Mailcap files already can contain information about
the textual nature of data (the "textualnewlines" field) and could easily
be extended to contain filename matching information (and should probably
also use file magic.)
I think this would further the progress of mailcaps in becomming more useful
and more universal. Unfortunately the trend is in the opposite direction,
with implementations bastardizing mailcap semantics enough that you end
up needing to have a separate mailcap file for different applications,
which kind of defeats the whole point.
This becomes less important by virtue of the decision to not require
newline canonicalization in HTTP, however, but instead requiring recognition
of common noncanonical formats.