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

fix #179, dvr support api to start or stop. 2.0.123

This commit is contained in:
winlin 2015-02-23 19:23:32 +08:00
parent 1246989ea9
commit d650118988
5 changed files with 252 additions and 41 deletions

View file

@ -851,9 +851,18 @@ SrsHttpMessage::~SrsHttpMessage()
int SrsHttpMessage::initialize()
{
int ret = ERROR_SUCCESS;
std::string host = get_request_header("Host");
// donot parse the empty host for uri,
// for example, the response contains no host,
// ignore it is ok.
if (host.empty()) {
return ret;
}
// parse uri to schema/server:port/path?query
std::string uri = "http://" + get_request_header("Host") + _url;
std::string uri = "http://" + host + _url;
if ((ret = _uri->initialize(uri)) != ERROR_SUCCESS) {
return ret;
}