Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-73288

QMimeDatabase::mimeTypeForName(QString) is case-sensitive, other than RFC 2045 says

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.12.0
    • Core: Other
    • None

    Description

      RFC 2045 says in "2. Definitions, Conventions, and Generic BNF Grammar":

      All media type values, subtype values, and parameter names as defined are case-insensitive.

      I have no other experience regarding the case sensitivity of MIME/Media types, but right now I interpret this text as in, the base of the MIME type identifier should be case insensitively handled.

      Current implementation of QMimeDatabase though seems to do things case sensitive, see also attached example, which if build and run results in the following output:

      "text/plain" -> QMimeType("text/plain")
      "TEXT/PLAIN" -> QMimeType(invalid)

      So: having QMimeDatabase::mimeTypeForName(QString) in the future dealing the name argument case-insensitive would be welcome

      Attachments

        1. qmimecasesensitive
          26 kB
        2. main.cpp
          0.4 kB
        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            dfaure_kdab David Faure
            kossebau Friedrich W. H. Kossebau
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes