File tree Expand file tree Collapse file tree
src/main/java/org/htmlunit Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments