Enigma2: Make User-Agent header HbbTV compliant
authorAthanasios Oikonomou <athoik@gmail.com>
Sun, 13 Dec 2015 08:36:52 +0000 (10:36 +0200)
committerErik Slagter <erik@openpli.org>
Sun, 13 Dec 2015 09:28:55 +0000 (10:28 +0100)
Apparently there are some HbbTV providers that require valid HbbTV User-Agent.

According to HbbTV specification http://www.etsi.org/deliver/etsi_ts/102700_102799/102796/01.01.01_60/ts_102796v010101p.pdf the User-Agent shall include:

HbbTV/1.1.1 (<capabilities>; [<vendorName>]; [<modelName>]; [<softwareVersion>];  [<hardwareVersion>]; <reserved>)

Maybe we can fill valid vendorName (eg Xtrend/VU+), modelName (eg ET10000/Solo4K), softwareVersion (Enigma2 version) and hardwareVersion (only for STB that provide such information), if we like to provide more statistics to providers.

More info: http://forums.openpli.org/topic/39444-hbbtv-issue/page-5#entry518642

(cherry picked from commit 2d824dfa6749c81f45b2b82945ba21e1014bf7b3)
Signed-off-by: Erik Slagter <erik@openpli.org>

lib/base/httpstream.cpp
lib/service/servicemp3.cpp

index a5fce10..cecd10b 100644 (file)
@@ -42,7 +42,7 @@ int eHttpStream::openUrl(const std::string &url, std::string &newurl)
 
        close();
 
-       std::string user_agent = "Enigma2";
+       std::string user_agent = "Enigma2 HbbTV/1.1.1 (+PVR+RTSP+DL;OpenPLi;;;)";
        std::string extra_headers = "";
        size_t pos = uri.find('#');
        if (pos != std::string::npos)
index b180476..d0c263f 100644 (file)
@@ -420,7 +420,7 @@ eServiceMP3::eServiceMP3(eServiceReference ref):
        m_use_chapter_entries = false; /* TOC chapter support CVR */
        m_last_seek_pos = 0; /* CVR last seek position */
 #endif
-       m_useragent = "Enigma2 Mediaplayer";
+       m_useragent = "Enigma2 HbbTV/1.1.1 (+PVR+RTSP+DL;OpenPLi;;;)";
        m_extra_headers = "";
        m_download_buffer_path = "";
        m_prev_decoder_time = -1;