From 49605b7bf933f2e1470498aeb415f85103c5641b Mon Sep 17 00:00:00 2001 From: Chris Hegarty Date: Fri, 31 Jan 2014 11:10:36 +0000 Subject: [PATCH] 7150539: HttpURLConnection.getResponseMessage() doesn't throw IOException on server error (OS X) Reviewed-by: michaelm, alanb --- jdk/test/sun/net/www/http/HttpClient/RetryPost.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jdk/test/sun/net/www/http/HttpClient/RetryPost.java b/jdk/test/sun/net/www/http/HttpClient/RetryPost.java index 2f5add47afa..da7d868c3f2 100644 --- a/jdk/test/sun/net/www/http/HttpClient/RetryPost.java +++ b/jdk/test/sun/net/www/http/HttpClient/RetryPost.java @@ -55,8 +55,8 @@ public class RetryPost void doClient() { try { InetSocketAddress address = httpServer.getAddress(); - URL url = new URL("http://" + address.getHostName() + ":" + address.getPort() + "/test/"); - HttpURLConnection uc = (HttpURLConnection)url.openConnection(); + URL url = new URL("http://localhost:" + address.getPort() + "/test/"); + HttpURLConnection uc = (HttpURLConnection)url.openConnection(Proxy.NO_PROXY); uc.setDoOutput(true); uc.setRequestMethod("POST"); uc.getResponseCode();