Skip to content

Commit b323aeb

Browse files
committed
Revert "test: prob dns before trying to connect (issue #966)"
This reverts commit ddf3f39.
1 parent f92f74c commit b323aeb

1 file changed

Lines changed: 1 addition & 5 deletions

File tree

src/main/java/org/htmlunit/HttpWebConnection.java

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -168,11 +168,6 @@ public HttpWebConnection(final WebClient webClient) {
168168
*/
169169
@Override
170170
public WebResponse getResponse(final WebRequest webRequest) throws IOException {
171-
// check if the host is known
172-
// this shows a better error message for hosts blocked in the DNS
173-
final URL url = webRequest.getUrl();
174-
InetAddress.getByName(url.getHost());
175-
176171
final HttpClientBuilder builder = reconfigureHttpClientIfNeeded(getHttpClientBuilder(), webRequest);
177172

178173
HttpUriRequest httpMethod = null;
@@ -185,6 +180,7 @@ public WebResponse getResponse(final WebRequest webRequest) throws IOException {
185180
+ " (reason: " + e.getMessage() + ")", e);
186181
}
187182

183+
final URL url = webRequest.getUrl();
188184
final HttpHost httpHost = new HttpHost(url.getHost(), url.getPort(), url.getProtocol());
189185
final long startTime = System.currentTimeMillis();
190186

0 commit comments

Comments
 (0)