git: openjdk/jdk13u-dev: 8236859: WebSocket over authenticating proxy fails with NPE

Yuri Nesterenko yan at openjdk.java.net
Wed Dec 23 12:17:47 UTC 2020


Changeset: 5d25a8ff
Author:    Ilarion Nakonechnyy <Ilarion at azul.com>
Committer: Yuri Nesterenko <yan at openjdk.org>
Date:      2020-12-23 12:16:55 +0000
URL:       https://git.openjdk.java.net/jdk13u-dev/commit/5d25a8ff

8236859: WebSocket over authenticating proxy fails with NPE

This change fixes several issues with WebSocket and proxy authentication. The AuthenticationFilter is changed to support an authenticating server accessed through an authenticating proxy. MultiExchange is fixed to close the previous connection if a new connection is necessary to establish the websocket (websocket connections are not cached and must be closed in that case). WebSocket OpeningHandshake is fixed to close the connection (without creating the RawChannel) if the opening handshake doesn't result in 101 upgrade protocol.

Reviewed-by: yan
Backport-of: c6da6681d418928c65cff6b1240e6b5d6bc5199b

! src/java.net.http/share/classes/jdk/internal/net/http/AuthenticationFilter.java
! src/java.net.http/share/classes/jdk/internal/net/http/ConnectionPool.java
! src/java.net.http/share/classes/jdk/internal/net/http/Http1Response.java
! src/java.net.http/share/classes/jdk/internal/net/http/HttpResponseImpl.java
! src/java.net.http/share/classes/jdk/internal/net/http/MultiExchange.java
! src/java.net.http/share/classes/jdk/internal/net/http/RawChannelTube.java
! src/java.net.http/share/classes/jdk/internal/net/http/common/Log.java
! src/java.net.http/share/classes/jdk/internal/net/http/websocket/OpeningHandshake.java
! src/java.net.http/share/classes/jdk/internal/net/http/websocket/RawChannel.java
+ test/jdk/java/net/httpclient/websocket/DummySecureWebSocketServer.java
+ test/jdk/java/net/httpclient/websocket/SecureSupport.java
! test/jdk/java/net/httpclient/websocket/WebSocketProxyTest.java



More information about the jdk-updates-changes mailing list