mirror of
https://github.com/QIDITECH/QIDISlicer.git
synced 2026-02-04 18:08:44 +03:00
Update Moonraker.cpp
This commit is contained in:
@@ -365,18 +365,17 @@ void Moonraker::set_auth(Http &http) const
|
|||||||
if (!m_cafile.empty())
|
if (!m_cafile.empty())
|
||||||
http.ca_file(m_cafile);
|
http.ca_file(m_cafile);
|
||||||
}
|
}
|
||||||
//B4
|
//B52
|
||||||
std::string Moonraker::make_url(const std::string &path) const
|
std::string Moonraker::make_url(const std::string &path) const
|
||||||
{
|
{
|
||||||
std::string m_host_add = m_host + ":10088";
|
if (m_host.find("http://") == 0 || m_host.find("https://") == 0) {
|
||||||
if (m_host_add.find("http://") == 0 || m_host_add.find("https://") == 0) {
|
if (m_host.back() == '/') {
|
||||||
if (m_host_add.back() == '/') {
|
return (boost::format("%1%%2%") % m_host % path).str();
|
||||||
return (boost::format("%1%%2%") % m_host_add % path).str();
|
|
||||||
} else {
|
} else {
|
||||||
return (boost::format("%1%/%2%") % m_host_add % path).str();
|
return (boost::format("%1%/%2%") % m_host % path).str();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return (boost::format("http://%1%/%2%") % m_host_add % path).str();
|
return (boost::format("http://%1%/%2%") % m_host % path).str();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user