/*
* Equivalent to WebsocketHybi10.test_firefox_602_connection_header in sockjs-protocol-0.3.3.py.
*/
@Test
public void webSocketHybi10Firefox602ConnectionHeader() throws Exception {
final SockJsServiceFactory echoFactory = echoService();
final EmbeddedChannel ch = ChannelUtil.webSocketChannel(echoFactory.config());
final FullHttpRequest request = HttpUtil.webSocketUpgradeRequest("/websocket", WebSocketVersion.V08);
request.headers().set(CONNECTION, "keep-alive, Upgrade");
ch.writeInbound(request);
final HttpResponse response = HttpUtil.decode(ch);
assertThat(response.getStatus(), is(HttpResponseStatus.SWITCHING_PROTOCOLS));