Fix HLS output not setting "responded" value appropriately
This commit is contained in:
parent
c10d5a7ec1
commit
f418fed81c
1 changed files with 8 additions and 0 deletions
|
@ -232,6 +232,7 @@ namespace Mist{
|
|||
H.setCORSHeaders();
|
||||
if (H.method == "OPTIONS" || H.method == "HEAD"){
|
||||
H.SendResponse("200", "OK", myConn);
|
||||
responded = true;
|
||||
return;
|
||||
}
|
||||
H.SetBody("<?xml version=\"1.0\"?><!DOCTYPE cross-domain-policy SYSTEM "
|
||||
|
@ -239,6 +240,7 @@ namespace Mist{
|
|||
"cross-domain-policy.dtd\"><cross-domain-policy><allow-access-from domain=\"*\" "
|
||||
"/><site-control permitted-cross-domain-policies=\"all\"/></cross-domain-policy>");
|
||||
H.SendResponse("200", "OK", myConn);
|
||||
responded = true;
|
||||
return;
|
||||
}// crossdomain.xml
|
||||
|
||||
|
@ -262,6 +264,7 @@ namespace Mist{
|
|||
}
|
||||
H.SetBody("");
|
||||
H.SendResponse("200", "OK", myConn);
|
||||
responded = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -311,6 +314,7 @@ namespace Mist{
|
|||
targetTime = HLS::getPartTargetTime(M, idx, mTrack, startTime, msn, part);
|
||||
if (!targetTime){
|
||||
H.SendResponse("404", "Partial fragment does not exist", myConn);
|
||||
responded = true;
|
||||
return;
|
||||
}
|
||||
startTime += part * HLS::partDurationMaxMs;
|
||||
|
@ -372,6 +376,7 @@ namespace Mist{
|
|||
"served.\n");
|
||||
myConn.SendNow(H.BuildResponse("404", "Fragment out of range"));
|
||||
WARN_MSG("Fragment @ %" PRIu64 " too old", startTime);
|
||||
responded = true;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -389,10 +394,12 @@ namespace Mist{
|
|||
}
|
||||
if (H.method == "OPTIONS" || H.method == "HEAD"){
|
||||
H.SendResponse("200", "OK", myConn);
|
||||
responded = true;
|
||||
return;
|
||||
}
|
||||
|
||||
H.StartResponse(H, myConn, VLCworkaround || config->getBool("nonchunked"));
|
||||
responded = true;
|
||||
// we assume whole fragments - but timestamps may be altered at will
|
||||
contPAT = fragmentIndex; // PAT continuity counter
|
||||
contPMT = fragmentIndex; // PMT continuity counter
|
||||
|
@ -419,6 +426,7 @@ namespace Mist{
|
|||
// Strip /hls/<streamname>/ from url
|
||||
std::string url = H.url.substr(H.url.find('/', 5) + 1);
|
||||
sendHlsManifest(url);
|
||||
responded = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue