cherry-pick: fix media type test assumption (see #295)