< prev index next >
src/java.net.http/share/classes/jdk/internal/net/http/websocket/OpeningHandshake.java
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
@@ -141,12 +141,11 @@
//
// https://tools.ietf.org/html/draft-hirano-httpbis-websocket-over-http2-00
requestBuilder.version(Version.HTTP_1_1).GET();
request = requestBuilder.buildForWebSocket();
request.isWebSocket(true);
- request.setSystemHeader(HEADER_UPGRADE, "websocket");
- request.setSystemHeader(HEADER_CONNECTION, "Upgrade");
+ Utils.setWebSocketUpgradeHeaders(request);
request.setProxy(proxy);
}
private static Collection<String> createRequestSubprotocols(
Collection<String> subprotocols)
< prev index next >