This commit changes all code that uses now deprecated methods in MimeType and MediaType. See gh-27580