changeset 9217:0c3ce4f14c1d

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 8297685e0908
children 62704cc3aaaf
files test/sun/net/www/http/HttpClient/RetryPost.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/sun/net/www/http/HttpClient/RetryPost.java	Fri Jan 31 12:06:34 2014 +0100
+++ b/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();