changeset 42668:9518a1858a96

8171043: ServerIdentityTest.java fails on Windows Summary: Before sending response, the server has to read the request. Reviewed-by: xuelei Contributed-by: John Jiang <sha.jiang@oracle.com>
author mli
date Mon, 12 Dec 2016 17:40:54 -0800
parents e058e6cdb4cf
children 0b8c4fd7cc85
files jdk/test/ProblemList.txt jdk/test/sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java
diffstat 2 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/jdk/test/ProblemList.txt	Mon Dec 12 17:29:46 2016 -0800
+++ b/jdk/test/ProblemList.txt	Mon Dec 12 17:40:54 2016 -0800
@@ -219,8 +219,6 @@
 
 sun/security/ssl/SSLSocketImpl/AsyncSSLSocketClose.java         8161232 macosx-all
 
-sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java  8171043 windows-all
-
 ############################################################################
 
 # jdk_sound
--- a/jdk/test/sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java	Mon Dec 12 17:29:46 2016 -0800
+++ b/jdk/test/sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java	Mon Dec 12 17:40:54 2016 -0800
@@ -43,6 +43,7 @@
 import java.io.OutputStreamWriter;
 import java.net.HttpURLConnection;
 import java.net.URL;
+
 import javax.net.ssl.HttpsURLConnection;
 import javax.net.ssl.SSLContext;
 import javax.net.ssl.SSLSocket;
@@ -70,6 +71,8 @@
 
     @Override
     protected void runServerApplication(SSLSocket socket) throws Exception {
+        InputStream sslIS = socket.getInputStream();
+        sslIS.read();
         BufferedWriter bw = new BufferedWriter(
                 new OutputStreamWriter(socket.getOutputStream()));
         bw.write("HTTP/1.1 200 OK\r\n\r\n\r\n");