CurlFile: add "GetServerReportedCharset" function
authorKarlson2k <k2k@narod.ru>
Sun, 18 Aug 2013 14:14:39 +0000 (18:14 +0400)
committerKarlson2k <k2k@narod.ru>
Sun, 27 Oct 2013 00:27:59 +0000 (04:27 +0400)
xbmc/filesystem/CurlFile.cpp
xbmc/filesystem/CurlFile.h

index f74cab1..c951a09 100644 (file)
@@ -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)
 {
index 0d50604..64f7b86 100644 (file)
@@ -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);