report charset in HTTP replies (suggested by Rolf Ahrenberg)

This commit is contained in:
schmirl 2009-09-15 10:39:17 +00:00
parent 0e9e22c23d
commit 6fb88f8d99
3 changed files with 9 additions and 2 deletions

View File

@ -35,6 +35,7 @@ Rolf Ahrenberg
for improving externremux script termination for improving externremux script termination
for fixing PAT repacker version field for fixing PAT repacker version field
for improving LIMIKUUTIO and PARENTALRATING patch detection for improving LIMIKUUTIO and PARENTALRATING patch detection
for suggesting to include the charset in HTTP replies
Rantanen Teemu Rantanen Teemu
for providing vdr-incompletesections.diff for providing vdr-incompletesections.diff

View File

@ -1,6 +1,7 @@
VDR Plugin 'streamdev' Revision History VDR Plugin 'streamdev' Revision History
--------------------------------------- ---------------------------------------
- report charset in HTTP replies (suggested by Rolf Ahrenberg)
- use SO_KEEPALIVE option on all sockets do detect dead sockets (thanks to - use SO_KEEPALIVE option on all sockets do detect dead sockets (thanks to
owagner) owagner)
- enable PatFilter for externremux, so VLC can be used as remuxer or client - enable PatFilter for externremux, so VLC can be used as remuxer or client

View File

@ -113,7 +113,12 @@ class cHtmlChannelList: public cChannelList
std::string ItemText(); std::string ItemText();
std::string PageBottom(); std::string PageBottom();
public: public:
virtual std::string HttpHeader() { return cChannelList::HttpHeader() + "Content-type: text/html\r\n\r\n"; } virtual std::string HttpHeader() {
return cChannelList::HttpHeader()
+ "Content-type: text/html; charset="
+ (cCharSetConv::SystemCharacterTable() ? cCharSetConv::SystemCharacterTable() : "UTF-8")
+ "\r\n";
}
virtual bool HasNext(); virtual bool HasNext();
virtual std::string Next(); virtual std::string Next();
cHtmlChannelList(cChannelIterator *Iterator, eStreamType StreamType, const char *Self, const char *GroupTarget); cHtmlChannelList(cChannelIterator *Iterator, eStreamType StreamType, const char *Self, const char *GroupTarget);
@ -128,7 +133,7 @@ class cM3uChannelList: public cChannelList
eM3uState m3uState; eM3uState m3uState;
cCharSetConv m_IConv; cCharSetConv m_IConv;
public: public:
virtual std::string HttpHeader() { return cChannelList::HttpHeader() + "Content-type: audio/x-mpegurl\r\n"; }; virtual std::string HttpHeader() { return cChannelList::HttpHeader() + "Content-type: audio/x-mpegurl; charset=UTF-8\r\n"; };
virtual bool HasNext(); virtual bool HasNext();
virtual std::string Next(); virtual std::string Next();
cM3uChannelList(cChannelIterator *Iterator, const char* Base); cM3uChannelList(cChannelIterator *Iterator, const char* Base);