7150539: HttpURLConnection.getResponseMessage() doesn't throw IOException on server error (OS X)
Reviewed-by: michaelm, alanb
--- 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();