OpenJDK / amber / amber
changeset 22625:50ee5cbd439b
7150539: HttpURLConnection.getResponseMessage() doesn't throw IOException on server error (OS X)
Reviewed-by: michaelm, alanb
author | chegar |
---|---|
date | Fri, 31 Jan 2014 11:10:36 +0000 |
parents | 860bde7fa0eb |
children | 758d413359c4 |
files | jdk/test/sun/net/www/http/HttpClient/RetryPost.java |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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();