diff options
author | Karlson2k <k2k@narod.ru> | 2013-08-18 18:14:39 +0400 |
---|---|---|
committer | Karlson2k <k2k@narod.ru> | 2013-10-27 04:27:59 +0400 |
commit | 05e35cd1e40de19263c066d751a07361b5867cd5 (patch) | |
tree | 21d3cc687563356d178c6a62994a5eab9ab6f664 | |
parent | 4d63ef9f90f0a0d1142894b26bc4a11af1b008c2 (diff) |
CurlFile: add "GetServerReportedCharset" function
-rw-r--r-- | xbmc/filesystem/CurlFile.cpp | 8 | ||||
-rw-r--r-- | xbmc/filesystem/CurlFile.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/xbmc/filesystem/CurlFile.cpp b/xbmc/filesystem/CurlFile.cpp index f74cab18d3..c951a09464 100644 --- a/xbmc/filesystem/CurlFile.cpp +++ b/xbmc/filesystem/CurlFile.cpp @@ -1546,6 +1546,14 @@ void CCurlFile::SetRequestHeader(CStdString header, long value) m_requestheaders[header] = buffer; } +std::string CCurlFile::GetServerReportedCharset(void) +{ + if (!m_state) + return ""; + + return m_state->m_httpheader.GetCharset(); +} + /* STATIC FUNCTIONS */ bool CCurlFile::GetHttpHeader(const CURL &url, CHttpHeader &headers) { diff --git a/xbmc/filesystem/CurlFile.h b/xbmc/filesystem/CurlFile.h index 0d5060417d..64f7b86a4b 100644 --- a/xbmc/filesystem/CurlFile.h +++ b/xbmc/filesystem/CurlFile.h @@ -90,6 +90,7 @@ namespace XFILE void SetBufferSize(unsigned int size); const CHttpHeader& GetHttpHeader() { return m_state->m_httpheader; } + std::string GetServerReportedCharset(void); /* static function that will get content type of a file */ static bool GetHttpHeader(const CURL &url, CHttpHeader &headers); |