Fixed support for non-HTTP-compliant devices pulling HTTP TS output

This commit is contained in:
Thulinma 2016-07-26 13:20:01 +02:00
parent bfa9882e8c
commit 6816b6074c
3 changed files with 9 additions and 1 deletions

View file

@ -26,8 +26,10 @@ namespace Mist {
void OutHTTPTS::onHTTP(){
std::string method = H.method;
initialize();
H.clearHeader("Range");
H.clearHeader("Icy-MetaData");
H.clearHeader("User-Agent");
H.SetHeader("Content-Type", "video/mp2t");
H.setCORSHeaders();
if(method == "OPTIONS" || method == "HEAD"){
@ -35,6 +37,7 @@ namespace Mist {
H.Clean();
return;
}
H.protocol = "HTTP/1.0";//Force HTTP/1.0 because some devices just don't understand chunked replies
H.StartResponse(H, myConn);
parseData = true;
wantRequest = false;