From d49ab90187c455c8a21055810e837e75f67ce046 Mon Sep 17 00:00:00 2001 From: Violeta Georgieva Date: Fri, 23 Dec 2016 10:41:25 +0200 Subject: [PATCH] Jetty/Standard/UndertowWebSocketClient headers test --- .../server/WebSocketIntegrationTests.java | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/spring-web-reactive/src/test/java/org/springframework/web/reactive/socket/server/WebSocketIntegrationTests.java b/spring-web-reactive/src/test/java/org/springframework/web/reactive/socket/server/WebSocketIntegrationTests.java index 51f71fe5e26..436b56eae59 100644 --- a/spring-web-reactive/src/test/java/org/springframework/web/reactive/socket/server/WebSocketIntegrationTests.java +++ b/spring-web-reactive/src/test/java/org/springframework/web/reactive/socket/server/WebSocketIntegrationTests.java @@ -197,6 +197,35 @@ public class WebSocketIntegrationTests extends AbstractWebSocketIntegrationTests testCustomHeader(new RxNettyWebSocketClient()); } + @Test + @Ignore + public void customHeaderJettyClient() throws Exception { + JettyWebSocketClient client = new JettyWebSocketClient(); + client.start(); + testCustomHeader(client); + client.stop(); + } + + @Test + public void customHeaderStandardClient() throws Exception { + testCustomHeader(new StandardWebSocketClient()); + } + + @Test + public void customHeaderUndertowClient() throws Exception { + if (server instanceof RxNettyHttpServer) { + // Caused by: java.io.IOException: Upgrade responses cannot have a transfer coding + // at org.xnio.http.HttpUpgrade$HttpUpgradeState.handleUpgrade(HttpUpgrade.java:490) + // at org.xnio.http.HttpUpgrade$HttpUpgradeState.access$1200(HttpUpgrade.java:165) + // at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:461) + // at org.xnio.http.HttpUpgrade$HttpUpgradeState$UpgradeResultListener.handleEvent(HttpUpgrade.java:400) + // at org.xnio.ChannelListeners.invokeChannelListener(ChannelListeners.java:92) + + return; + } + testCustomHeader(new UndertowWebSocketClient()); + } + private void testCustomHeader(WebSocketClient client) throws Exception { HttpHeaders headers = new HttpHeaders();