public static void writeContent(final FullHttpResponse response, final String content, final String contentType) {
final ByteBuf buf = copiedBuffer(content, CharsetUtil.UTF_8);
response.headers().set(CONTENT_LENGTH, buf.readableBytes());
response.content().writeBytes(buf);
response.headers().set(CONTENT_TYPE, contentType);
buf.release();
}
/**
* Sets the following Http response headers
* - SET_COOKIE if {@link org.jboss.aerogear.io.netty.handler.codec.sockjs.SockJsConfig#areCookiesNeeded()} is true