From c0bab1d10d6af4e080c56643b7a48bed409b0dba Mon Sep 17 00:00:00 2001 From: Thulinma Date: Wed, 25 Jul 2018 13:39:42 +0200 Subject: [PATCH] Magical fix for HTTP output selection not allowing slashes in the $-part. --- src/output/output_http.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/output/output_http.cpp b/src/output/output_http.cpp index 96486ab6..4df8ea99 100644 --- a/src/output/output_http.cpp +++ b/src/output/output_http.cpp @@ -54,6 +54,9 @@ namespace Mist { if (found != std::string::npos){ 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 (url.substr(found, url.size() - m.size() + 1).find('/') != std::string::npos){ + return false; + } streamname = url.substr(found, url.size() - m.size() + 1); return true; } @@ -67,6 +70,9 @@ namespace Mist { if (url.size() < m.size()){return false;} 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 (url.substr(found, found_suf - found).find('/') != std::string::npos){ + return false; + } streamname = url.substr(found, found_suf - found); return true; }