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

Fix #1031, Always use vhost in stream query, the unify uri. 3.0.35

This commit is contained in:
winlin 2018-08-02 09:17:49 +08:00
parent 8cf5df5afb
commit 68a1656e07
18 changed files with 102 additions and 159 deletions

View file

@ -559,15 +559,15 @@ VOID TEST(ProtocolUtilityTest, GenerateTcUrl)
string ip; string vhost; string app; int port; string tcUrl; string param;
ip = "127.0.0.1"; vhost = "__defaultVhost__"; app = "live"; port = 1935;
tcUrl = srs_generate_tc_url(ip, vhost, app, port, param);
tcUrl = srs_generate_tc_url(ip, vhost, app, port);
EXPECT_STREQ("rtmp://127.0.0.1/live", tcUrl.c_str());
ip = "127.0.0.1"; vhost = "demo"; app = "live"; port = 1935;
tcUrl = srs_generate_tc_url(ip, vhost, app, port, param);
tcUrl = srs_generate_tc_url(ip, vhost, app, port);
EXPECT_STREQ("rtmp://demo/live", tcUrl.c_str());
ip = "127.0.0.1"; vhost = "demo"; app = "live"; port = 19351;
tcUrl = srs_generate_tc_url(ip, vhost, app, port, param);
tcUrl = srs_generate_tc_url(ip, vhost, app, port);
EXPECT_STREQ("rtmp://demo:19351/live", tcUrl.c_str());
}