Merge branch 'development' into LTS_development

This commit is contained in:
Thulinma 2018-07-23 12:53:28 +02:00
commit 0f0615236f
9 changed files with 41 additions and 16 deletions

View file

@ -67,6 +67,7 @@ namespace Mist {
}
void OutHTTP::onFail(){
std::string method = H.method;
// send logo icon
if (H.url.length() > 4 && H.url.substr(H.url.length() - 4, 4) == ".ico"){
sendIcon();
@ -90,7 +91,14 @@ namespace Mist {
H.Clean();
H.SetBody("if (!mistvideo){var mistvideo = {};}\nmistvideo['" + streamName + "'] = "+json_resp.toString()+";\n");
}
H.setCORSHeaders();
if(method == "OPTIONS" || method == "HEAD"){
H.SendResponse("200", "OK", myConn);
H.Clean();
return;
}
H.SendResponse("200", "Stream not found", myConn);
H.Clean();
return;
}
INFO_MSG("Failing: %s", H.url.c_str());