This closes #38 Netty fix

This commit is contained in:
Clebert Suconic 2015-06-18 09:34:47 -04:00
commit e110a1bf01
1 changed files with 3 additions and 3 deletions

View File

@ -29,8 +29,8 @@ import io.netty.channel.ChannelHandler;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelPipeline;
import io.netty.handler.codec.ByteToMessageDecoder;
import io.netty.handler.codec.http.DefaultFullHttpRequest;
import io.netty.handler.codec.http.DefaultFullHttpResponse;
import io.netty.handler.codec.http.FullHttpRequest;
import io.netty.handler.codec.http.HttpHeaders;
import io.netty.handler.codec.http.HttpObjectAggregator;
import io.netty.handler.codec.http.HttpRequestDecoder;
@ -102,9 +102,9 @@ public class ProtocolHandler
@Override
public void channelRead(ChannelHandlerContext ctx, Object msg) throws Exception
{
if (msg instanceof DefaultFullHttpRequest)
if (msg instanceof FullHttpRequest)
{
DefaultFullHttpRequest request = (DefaultFullHttpRequest) msg;
FullHttpRequest request = (FullHttpRequest) msg;
HttpHeaders headers = request.headers();
String upgrade = headers.get("upgrade");
if (upgrade != null && upgrade.equalsIgnoreCase("websocket"))