diff -r d40cc68d31b4 -r 4cc44dd9f14f jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java --- a/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java Fri Feb 24 11:33:33 2017 +0000 +++ b/jdk/src/jdk.incubator.httpclient/share/classes/jdk/incubator/http/HttpRequestImpl.java Fri Feb 24 17:05:00 2017 +0000 @@ -81,6 +81,7 @@ this.userHeaders = request.headers(); if (request instanceof HttpRequestImpl) { this.systemHeaders = ((HttpRequestImpl) request).systemHeaders; + this.isWebSocket = ((HttpRequestImpl) request).isWebSocket; } else { this.systemHeaders = new HttpHeadersImpl(); } @@ -102,6 +103,7 @@ HttpRequestImpl other) { this.method = method == null? "GET" : method; this.userHeaders = other.userHeaders; + this.isWebSocket = other.isWebSocket; this.systemHeaders = other.systemHeaders; this.uri = uri; this.expectContinue = other.expectContinue; @@ -115,6 +117,9 @@ /* used for creating CONNECT requests */ HttpRequestImpl(String method, HttpClientImpl client, InetSocketAddress authority) { + // TODO: isWebSocket flag is not specified, but the assumption is that + // such a request will never be made on a connection that will be returned + // to the connection pool (we might need to revisit this constructor later) this.method = method; this.systemHeaders = new HttpHeadersImpl(); this.userHeaders = ImmutableHeaders.empty();