Merge pull request #128 from veebs/WebSocketVersion

Use WebSocketVersion enum rather than string literal
This commit is contained in:
Vibul Imtarnasan 2011-12-14 21:57:41 -08:00
commit f38bf74f3e

View File

@ -86,7 +86,7 @@ public class WebSocketServerHandshakerFactory {
HttpResponse res = new DefaultHttpResponse(HttpVersion.HTTP_1_1, new HttpResponseStatus(101,
"Switching Protocols"));
res.setStatus(HttpResponseStatus.UPGRADE_REQUIRED);
res.setHeader(Names.SEC_WEBSOCKET_VERSION, "13");
res.setHeader(Names.SEC_WEBSOCKET_VERSION, WebSocketVersion.V13.toHttpHeaderValue());
channel.write(res);
}