Release Note: `java.net.FileNameMap.getContentTypeFor(fileName)` May Return a Different MIME Type for Certain Filenames

XMLWordPrintable

    • Type: Sub-task
    • Resolution: Delivered
    • Priority: P4
    • 18
    • Affects Version/s: 11.0.18-oracle, 17.0.6-oracle, 18
    • Component/s: core-libs

      The default, built-in filename map in the JDK has been updated to include additional filename to MIME type mappings. Along with the additions, existing mappings of `.gz` and `.zip` have also been updated. This can result in the default, built-in `java.net.FileNameMap` instance returning a different MIME type from the `getContentTypeFor(String fileName)` method than what it returned in previous JDK releases.

      `java.net.URLConnection.guessContentTypeFromName(String fname)`, which may use this default, built-in `FileNameMap` instance, thus may return a different value than previously.

            Assignee:
            Jaikiran Pai
            Reporter:
            Jaikiran Pai
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: