Merge branch 'development' into LTS_development

This commit is contained in:
Thulinma 2018-07-26 16:24:06 +02:00
commit 663356d3bc

View file

@ -53,6 +53,9 @@ namespace Mist {
if (found != std::string::npos){ if (found != std::string::npos){
if (url.size() < m.size()){return false;} if (url.size() < m.size()){return false;}
if (m.substr(0, found) == url.substr(0, found) && m.substr(found+1) == url.substr(url.size() - (m.size() - found) + 1)){ if (m.substr(0, found) == url.substr(0, found) && m.substr(found+1) == url.substr(url.size() - (m.size() - found) + 1)){
if (url.substr(found, url.size() - m.size() + 1).find('/') != std::string::npos){
return false;
}
streamname = url.substr(found, url.size() - m.size() + 1); streamname = url.substr(found, url.size() - m.size() + 1);
return true; return true;
} }
@ -66,6 +69,9 @@ namespace Mist {
if (url.size() < m.size()){return false;} if (url.size() < m.size()){return false;}
size_t found_suf = url.find(m.substr(found+1), found); size_t found_suf = url.find(m.substr(found+1), found);
if (m.substr(0, found) == url.substr(0, found) && found_suf != std::string::npos){ if (m.substr(0, found) == url.substr(0, found) && found_suf != std::string::npos){
if (url.substr(found, found_suf - found).find('/') != std::string::npos){
return false;
}
streamname = url.substr(found, found_suf - found); streamname = url.substr(found, found_suf - found);
return true; return true;
} }