From 695ceeab48352a6d8b03542dde10ac92ca4a9bde Mon Sep 17 00:00:00 2001 From: winlin Date: Sat, 25 Feb 2017 11:30:25 +0800 Subject: [PATCH] Refine code for #777 --- trunk/src/protocol/srs_http_stack.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/trunk/src/protocol/srs_http_stack.cpp b/trunk/src/protocol/srs_http_stack.cpp index ed50ddfb8..e8f0cde53 100644 --- a/trunk/src/protocol/srs_http_stack.cpp +++ b/trunk/src/protocol/srs_http_stack.cpp @@ -3037,7 +3037,6 @@ int SrsHttpUri::initialize(string _url) { int ret = ERROR_SUCCESS; - //port = 0; schema = host = path = query = ""; url = _url; @@ -3063,9 +3062,9 @@ int SrsHttpUri::initialize(string _url) if(!field.empty()){ port = atoi(field.c_str()); } - if(port<=0){ - port = SRS_DEFAULT_HTTP_PORT; - } + if(port<=0){ + port = SRS_DEFAULT_HTTP_PORT; + } path = get_uri_field(url, &hp_u, UF_PATH); srs_info("parse url %s success", purl);