--- old/test/jdk/sun/net/www/protocol/https/ChunkedOutputStream.java 2019-08-13 16:22:26.000000000 +0100 +++ new/test/jdk/sun/net/www/protocol/https/ChunkedOutputStream.java 2019-08-13 16:22:26.000000000 +0100 @@ -138,6 +138,17 @@ } } + public boolean closeOnException(Exception ex) { + if (ex instanceof SSLException) { + if (ex.toString().contains("Unrecognized SSL message, plaintext connection?")) { + System.out.println("TestHttpsServer receveived rogue connection: " + ex); + System.out.println("Ignoring rogue connection..."); + return true; + } + } + return false; + } + static void readAndCompare(InputStream is, String cmp) throws IOException { int c; byte buf[] = new byte[1024];