Fixes #273. Implement media type profile matching.