git: openjdk/mobile: 8236859: WebSocket over authenticating proxy fails with NPE

duke duke at openjdk.java.net
Fri Jan 17 18:05:53 UTC 2020


Changeset: c6da6681
Author:    Daniel Fuchs <dfuchs at openjdk.org>
Date:      2020-01-17 17:55:06 +0000
URL:       https://git.openjdk.java.net/mobile/commit/c6da6681

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: prappo, chegar

! 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 mobile-changes mailing list