mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
Refine code for #777
This commit is contained in:
parent
a3df4e3bfb
commit
695ceeab48
1 changed files with 3 additions and 4 deletions
|
@ -3037,7 +3037,6 @@ int SrsHttpUri::initialize(string _url)
|
||||||
{
|
{
|
||||||
int ret = ERROR_SUCCESS;
|
int ret = ERROR_SUCCESS;
|
||||||
|
|
||||||
//port = 0;
|
|
||||||
schema = host = path = query = "";
|
schema = host = path = query = "";
|
||||||
|
|
||||||
url = _url;
|
url = _url;
|
||||||
|
@ -3063,9 +3062,9 @@ int SrsHttpUri::initialize(string _url)
|
||||||
if(!field.empty()){
|
if(!field.empty()){
|
||||||
port = atoi(field.c_str());
|
port = atoi(field.c_str());
|
||||||
}
|
}
|
||||||
if(port<=0){
|
if(port<=0){
|
||||||
port = SRS_DEFAULT_HTTP_PORT;
|
port = SRS_DEFAULT_HTTP_PORT;
|
||||||
}
|
}
|
||||||
|
|
||||||
path = get_uri_field(url, &hp_u, UF_PATH);
|
path = get_uri_field(url, &hp_u, UF_PATH);
|
||||||
srs_info("parse url %s success", purl);
|
srs_info("parse url %s success", purl);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue