mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
refine http client, use initialize to set host and port.
This commit is contained in:
parent
2bcb4f811c
commit
1277968d4a
6 changed files with 59 additions and 66 deletions
|
@ -1042,18 +1042,6 @@ int SrsHttpMessage::update(string url, http_parser* header, SrsFastBuffer* body,
|
|||
|
||||
// parse uri to schema/server:port/path?query
|
||||
std::string uri = "http://" + host + _url;
|
||||
|
||||
return update(uri);
|
||||
}
|
||||
|
||||
int SrsHttpMessage::update(string uri)
|
||||
{
|
||||
int ret = ERROR_SUCCESS;
|
||||
|
||||
if (uri.empty()) {
|
||||
return ret;
|
||||
}
|
||||
|
||||
if ((ret = _uri->initialize(uri)) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue