aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKarlson2k <k2k@narod.ru>2013-11-21 21:00:29 +0400
committerKarlson2k <k2k@narod.ru>2013-12-09 18:52:21 +0400
commita9e149117f3b014f5d26e232e34630776bcea6e3 (patch)
tree6f4c5fdb18a4cfe3171a24502614b45fcb539677
parent247a6f09e1af1d6cfc08084ca32e55dc0a93a50b (diff)
HttpHeader::GetMimeType: fix: trim whitespace chars according to RFC2616
-rw-r--r--xbmc/utils/HttpHeader.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/xbmc/utils/HttpHeader.cpp b/xbmc/utils/HttpHeader.cpp
index f0b109b137..f98605d518 100644
--- a/xbmc/utils/HttpHeader.cpp
+++ b/xbmc/utils/HttpHeader.cpp
@@ -173,7 +173,10 @@ std::string CHttpHeader::GetMimeType(void) const
{
std::string strValue(GetValueRaw("content-type"));
- return strValue.substr(0, strValue.find(';'));
+ std::string mimeType(strValue, 0, strValue.find(';'));
+ StringUtils::TrimRight(mimeType, m_whitespaceChars);
+
+ return mimeType;
}
std::string CHttpHeader::GetCharset(void) const