1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-02-14 12:21:55 +00:00

For #1488, improve coverage for parsing client ip.

This commit is contained in:
winlin 2019-12-26 12:20:53 +08:00
parent 2115d5d22a
commit 32a2b7f0a5

View file

@ -1711,6 +1711,16 @@ VOID TEST(ProtocolHTTPTest, GetOriginalIP)
EXPECT_STREQ("172.14.42.78", srs_get_original_ip(&m).c_str());
}
if (true) {
SrsHttpHeader h;
h.set("X-Real-IP", "172.14.42.79:15425");
SrsHttpMessage m;
m.set_header(&h, false);
EXPECT_STREQ("172.14.42.79", srs_get_original_ip(&m).c_str());
}
if (true) {
SrsHttpHeader h;