Skip to content
This repository was archived by the owner on May 4, 2024. It is now read-only.

Commit 0fc9db1

Browse files
author
Randall Tom
committed
Updated DNS resolver bug
1 parent a6e455e commit 0fc9db1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.DS_Store

0 Bytes
Binary file not shown.

src/main/java/com/mulesoft/tool/network/NetworkUtils.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public static String ping(String host) throws Exception {
2020
}
2121

2222
public static String resolveIPs(String host, String dnsServer) throws UnknownHostException {
23-
if (dnsServer.equals("default"))
23+
if (dnsServer.equals("default") || dnsServer == null || dnsServer.isEmpty())
2424
{
2525
InetAddress[] addresses = InetAddress.getAllByName(host);
2626
StringBuilder sb = new StringBuilder();
@@ -46,6 +46,7 @@ public static String curl(String url) throws IOException {
4646
//-i include protocol headers
4747
//-L follow redirects
4848
//-k insecure
49+
//-E cert status
4950
return execute(new ProcessBuilder("curl","-k", "-i","-L", url));
5051
}
5152

0 commit comments

Comments
 (0)