[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kioslave/http
From: Dawit Alemayehu <adawit () kde ! org>
Date: 2011-01-25 11:12:36
Message-ID: 20110125111236.76F6CAC8B9 () svn ! kde ! org
[Download RAW message or body]
SVN commit 1216992 by adawit:
Added mime-type fix for video/webm being sent as text/plain
M +8 -6 http.cpp
--- trunk/KDE/kdelibs/kioslave/http/http.cpp #1216991:1216992
@@ -2632,17 +2632,19 @@
// Some webservers say "text/plain" when they mean "application/x-bzip"
else if ((m_mimeType == QLatin1String("text/plain")) || (m_mimeType == \
QLatin1String("application/octet-stream"))) {
- QString ext = m_request.url.path().right(4).toUpper();
- if (ext == QLatin1String(".BZ2"))
+ const QString ext = QFileInfo(m_request.url.path()).suffix().toUpper();
+ if (ext == QLatin1String("BZ2"))
m_mimeType = QLatin1String("application/x-bzip");
- else if (ext == QLatin1String(".PEM"))
+ else if (ext == QLatin1String("PEM"))
m_mimeType = QLatin1String("application/x-x509-ca-cert");
- else if (ext == QLatin1String(".SWF"))
+ else if (ext == QLatin1String("SWF"))
m_mimeType = QLatin1String("application/x-shockwave-flash");
- else if (ext == QLatin1String(".PLS"))
+ else if (ext == QLatin1String("PLS"))
m_mimeType = QLatin1String("audio/x-scpls");
- else if (ext == QLatin1String(".WMV"))
+ else if (ext == QLatin1String("WMV"))
m_mimeType = QLatin1String("video/x-ms-wmv");
+ else if (ext == QLatin1String("WEBM"))
+ m_mimeType = QLatin1String("video/webm");
}
kDebug(7113) << "after fixup" << m_mimeType;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic