diff options
author | Mike Kaganski <mike.kaganski@collabora.com> | 2017-04-05 10:11:36 +0300 |
---|---|---|
committer | Mike Kaganski <mike.kaganski@collabora.com> | 2017-04-06 20:53:46 +0000 |
commit | cce7c5da974152cdd86e88e17b5acad8a0423823 (patch) | |
tree | 7b89a5339e4e480b78e135fea8ad26a6c744858f /filter | |
parent | 14f3ca72d9f3bfb76f22e566cc4109ca38b3493c (diff) |
sType and sSubType are already normalized to ASCII lower case
... upon successful return from INetContentType::parse
Change-Id: I8a0c50c1c655477138578e59031b64fb6b2b7218
Reviewed-on: https://gerrit.libreoffice.org/36129
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 97f048e633f07655eda000ae4f4da818c935091e)
Reviewed-on: https://gerrit.libreoffice.org/36146
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 6e336c43a239f515cc882a3da1bad63e3507b230)
Reviewed-on: https://gerrit.libreoffice.org/36236
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/xmlfilterdetect/filterdetect.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/filter/source/xmlfilterdetect/filterdetect.cxx b/filter/source/xmlfilterdetect/filterdetect.cxx index 3e13cb17d607..7bf2e2925a8f 100644 --- a/filter/source/xmlfilterdetect/filterdetect.cxx +++ b/filter/source/xmlfilterdetect/filterdetect.cxx @@ -56,13 +56,13 @@ bool IsMediaTypeXML( const OUString& mediaType ) { OUString sType, sSubType; INetContentTypes::parse(mediaType, sType, sSubType); - if (sType.equalsIgnoreAsciiCase("application")) + if (sType == "application") { // RFC 3023: application/xml; don't detect text/xml - if (sSubType.equalsIgnoreAsciiCase("xml")) + if (sSubType == "xml") return true; // Registered media types: application/XXXX+xml - if (sSubType.endsWithIgnoreAsciiCase("+xml")) + if (sSubType.endsWith("+xml")) return true; } } |