From 9b662913e55d17aa6640427e44fdc322560024fe Mon Sep 17 00:00:00 2001 From: Thulinma Date: Thu, 4 Jul 2013 12:06:32 +0200 Subject: [PATCH] Added streamname.html page that includes the embed script. --- src/connectors/conn_http.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/src/connectors/conn_http.cpp b/src/connectors/conn_http.cpp index b174e847..38a67ea1 100644 --- a/src/connectors/conn_http.cpp +++ b/src/connectors/conn_http.cpp @@ -177,6 +177,19 @@ namespace Connector_HTTP { return ret; } + // send logo icon + if (url.length() > 6 && url.substr(url.length() - 5, 5) == ".html"){ + std::string streamname = url.substr(1, url.length() - 6); + Util::Stream::sanitizeName(streamname); + H.Clean(); + H.SetHeader("Content-Type", "text/html"); + H.SetHeader("Server", "mistserver/" PACKAGE_VERSION "/" + Util::Config::libver); + H.SetBody("Stream "+streamname+""); + long long int ret = Util::getMS(); + conn->SendNow(H.BuildResponse("200", "OK")); + return ret; + } + if ((url.length() > 9 && url.substr(0, 6) == "/info_" && url.substr(url.length() - 3, 3) == ".js") || (url.length() > 10 && url.substr(0, 7) == "/embed_" && url.substr(url.length() - 3, 3) == ".js")){ std::string streamname; @@ -496,6 +509,9 @@ namespace Connector_HTTP { if (ext == ".ico"){ return "internal"; } + if (url.length() > 6 && url.substr(url.length() - 5, 5) == ".html"){ + return "internal"; + } } if (url == "/crossdomain.xml"){ return "internal";