Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-470

Mime type should not be case sensitive

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 1.3.0.Beta1, 1.2.8.Final
    • 1.1.0.Final
    • Core
    • None

      Method ServletContextImpl.getMimeType is case sensitive:

      @Override
      public String getMimeType(final String file) {
          int pos = file.lastIndexOf('.');
          if (pos == -1) {
              return deployment.getMimeExtensionMappings().get(file);
          }
          return deployment.getMimeExtensionMappings().get(file.substring(pos + 1));
      }
      

      i.e. *.PDF is not *.pdf. This causes an error during downloading files, such as * .PDF.
      But RFC 2045 says: All media type values, subtype values, and parameter names as defined are case-insensitive.

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              korablev43 Alexander Korablev (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: