Use WebSocketVersion enum rather than string literal

This commit is contained in:
vibul 2011-12-15 16:42:25 +11:00
parent 812a79fd52
commit 16bf84dac1

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);
}