Using query parameters in example instead

This commit is contained in:
Joakim Erdfelt 2013-05-08 12:26:51 -07:00
parent 281f150831
commit 3fa029ed88
1 changed files with 2 additions and 2 deletions

View File

@ -37,8 +37,8 @@ public class MyAdvancedEchoCreator implements WebSocketCreator
@Override
public Object createWebSocket(UpgradeRequest req, UpgradeResponse resp)
{
String type = req.getHeader("type");
if ("binary".equals(type))
String[] type = req.getParameterMap().get("type");
if ((type != null) && (type.length >= 1) && ("binary".equals(type[0])))
{
return binaryEcho;
}