1
0
mirror of synced 2025-12-01 23:17:49 +03:00
This commit is contained in:
yhirose
2025-11-25 22:22:07 -05:00
parent adf58bf474
commit 84796738fc

View File

@@ -7618,7 +7618,14 @@ TEST(SNI_AutoDetectionTest, SNI_Logic) {
SSLClient cli("::1", PORT); SSLClient cli("::1", PORT);
cli.enable_server_certificate_verification(false); cli.enable_server_certificate_verification(false);
auto res = cli.Get("/sni?expected="); auto res = cli.Get("/sni?expected=");
ASSERT_TRUE(res);
// NOTE: This may fail if the server is listening on IPv4 only
// (e.g., when localhost resolves to 127.0.0.1 only)
if (res) {
EXPECT_EQ(StatusCode::OK_200, res->status);
} else {
EXPECT_EQ(Error::Connection, res.error());
}
} }
} }
} }