From 5db15cc6303635633e5d8c392008d233e091265f Mon Sep 17 00:00:00 2001 From: Stefan Seyfried Date: Sat, 6 Apr 2013 11:49:47 +0200 Subject: [PATCH] nhttpd: fix streaming with non-standard port --- src/nhttpd/tuxboxapi/coolstream/controlapi.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp index 8bd76dcb7..3894cedac 100644 --- a/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp +++ b/src/nhttpd/tuxboxapi/coolstream/controlapi.cpp @@ -2561,6 +2561,10 @@ void CControlAPI::build_live_url(CyhookHandler *hh) url = "http://"+hh->ParamList["host"]; else url = "http://"+hh->HeaderList["Host"]; + /* strip off optional custom port */ + if (url.rfind(":") != 4) + url = url.substr(0, url.rfind(":")); + //url += (mode == CZapitClient::MODE_TV) ? ":31339/0," : ":31338/"; url += ":31339/0,"; url += xpids;