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:
parent
2115d5d22a
commit
32a2b7f0a5
1 changed files with 10 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Reference in a new issue