1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

move config to app, for its application level features

This commit is contained in:
winlin 2014-03-01 15:59:55 +08:00
parent 517d346a52
commit b407021d45
14 changed files with 149 additions and 80 deletions

View file

@ -85,27 +85,3 @@ std::string srs_dns_resolve(std::string host)
return ipv4;
}
void srs_vhost_resolve(std::string& vhost, std::string& app)
{
app = srs_replace(app, "...", "?");
size_t pos = 0;
if ((pos = app.find("?")) == std::string::npos) {
return;
}
std::string query = app.substr(pos + 1);
app = app.substr(0, pos);
if ((pos = query.find("vhost?")) != std::string::npos
|| (pos = query.find("vhost=")) != std::string::npos
|| (pos = query.find("Vhost?")) != std::string::npos
|| (pos = query.find("Vhost=")) != std::string::npos
) {
query = query.substr(pos + 6);
if (!query.empty()) {
vhost = query;
}
}
}