8171043: ServerIdentityTest.java fails on Windows

Before sending response, the server has to read the request.

Reviewed-by: xuelei
This commit is contained in:
John Jiang 2016-12-12 17:40:54 -08:00 committed by Hamlin Li
parent 634875f391
commit 85905cb757
2 changed files with 3 additions and 2 deletions

View File

@ -219,8 +219,6 @@ sun/security/krb5/auto/HttpNegotiateServer.java 8038079 generic-
sun/security/ssl/SSLSocketImpl/AsyncSSLSocketClose.java 8161232 macosx-all
sun/net/www/protocol/https/HttpsClient/ServerIdentityTest.java 8171043 windows-all
############################################################################
# jdk_sound

View File

@ -43,6 +43,7 @@ import java.io.BufferedWriter;
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 @@ public final class ServerIdentityTest extends SSLSocketTemplate {
@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");