final Frame frame = (Frame) msg;
if (headerSent.compareAndSet(false, true)) {
final HttpResponse response = createResponse(Transports.CONTENT_TYPE_JAVASCRIPT);
ctx.writeAndFlush(response);
final ByteBuf content = wrapWithLN(new PreludeFrame().content());
final DefaultHttpContent preludeChunk = new DefaultHttpContent(content);
ctx.writeAndFlush(preludeChunk);
}
ctx.writeAndFlush(new DefaultHttpContent(wrapWithLN(frame.content())), promise);