private static final byte[] TOKEN = "\r\n\r\n".getBytes();
private static final Pattern PATTERN = Pattern.compile(" ");
public Object decode(Session session, Packet packet) throws Exception {
Buffer buffer = packet.getContent();
int index = buffer.indexOf(TOKEN);
if (index >= 0) {
String[] headers = buffer.getString(Charset.UTF8,
index + TOKEN.length).split("\r\n");
HttpRequest request = new HttpRequest();