Further improvement to error handling of HTTP internal output.

This commit is contained in:
Thulinma 2014-12-11 12:41:10 +01:00
parent 3c45efc9e4
commit a9bf4fea4a

View file

@ -27,7 +27,7 @@ namespace Mist {
H.SetBody("{\"error\":\"Could not retrieve stream. Sorry.\"}\n"); H.SetBody("{\"error\":\"Could not retrieve stream. Sorry.\"}\n");
}else{ }else{
H.Clean(); H.Clean();
H.SetBody("mistvideo['" + streamName + "'] = {\"error\":\"Could not retrieve stream. Sorry.\"};\n"); H.SetBody("if (!mistvideo){var mistvideo = {};}\nmistvideo['" + streamName + "'] = {\"error\":\"Could not retrieve stream. Sorry.\"};\n");
} }
H.SendResponse("200", "Stream not found", myConn); H.SendResponse("200", "Stream not found", myConn);
}else{ }else{