mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2026-10-17 10:59:39 +00:00
Fix #2248
This commit is contained in:
1 parent
adf58bf474
commit
84796738fc
1 file changed
+8
-1
+8
-1
@@ -7618,7 +7618,14 @@ TEST(SNI_AutoDetectionTest, SNI_Logic) {
|
||||
SSLClient cli("::1", PORT);
|
||||
cli.enable_server_certificate_verification(false);
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user