Skip to content

Commit

Permalink
Use GetUseHTTPS in GetWebURL
Browse files Browse the repository at this point in the history
  • Loading branch information
rubdos committed Feb 3, 2019
1 parent 8ad9512 commit 72a34b8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/tvheadend/HTSPConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ std::string HTSPConnection::GetWebURL ( const char *fmt, ... ) const
if (!auth.empty())
auth += "@";

std::string url = StringUtils::Format("http://%s%s:%d", auth.c_str(), settings.GetHostname().c_str(), settings.GetPortHTTP());
std::string proto = settings.GetUseHTTPS() ? "https" : "http";
std::string url = StringUtils::Format("%s://%s%s:%d", proto, auth.c_str(), settings.GetHostname().c_str(), settings.GetPortHTTP());

CLockObject lock(m_mutex);
va_start(va, fmt);
Expand Down

0 comments on commit 72a34b8

Please sign in to comment.