# HG changeset patch # User chegar # Date 1391166636 0 # Node ID 50ee5cbd439bfc3bdb00124eabd38a76d9ad521b # Parent 860bde7fa0ebb10b272e7bb1b9c86142a39af8ab 7150539: HttpURLConnection.getResponseMessage() doesn't throw IOException on server error (OS X) Reviewed-by: michaelm, alanb diff -r 860bde7fa0eb -r 50ee5cbd439b jdk/test/sun/net/www/http/HttpClient/RetryPost.java --- a/jdk/test/sun/net/www/http/HttpClient/RetryPost.java Fri Jan 31 12:06:34 2014 +0100 +++ b/jdk/test/sun/net/www/http/HttpClient/RetryPost.java Fri Jan 31 11:10:36 2014 +0000 @@ -55,8 +55,8 @@ 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();