log.debug("Encoded packet: {}", encodedPacket);
TransportType transportType = packet.getTransportType();
if (transportType == TransportType.WEBSOCKET || transportType == TransportType.FLASHSOCKET) {
out.add(new TextWebSocketFrame(encodedPacket));
} else if (transportType == TransportType.XHR_POLLING) {
<BUG>out.add(PipelineUtils.createHttpResponse(packet.getOrigin(),PipelineUtils.copiedBuffer(ctx.alloc(), encodedPacket), false));
} else if (transportType == TransportType.JSONP_POLLING) {
String jsonpIndexParam = (packet.getJsonpIndexParam() != null) ? packet.getJsonpIndexParam() : "0";
String encodedJsonpPacket = String.format(JSONP_TEMPLATE, jsonpIndexParam, encodedPacket);

HttpResponse httpResponse = PipelineUtils.createHttpResponse(packet.getOrigin(),
PipelineUtils.copiedBuffer(ctx.alloc(), encodedJsonpPacket), true);</BUG>
httpResponse.headers().add("X-XSS-Protection", "0");

log.debug("Encoded packet: {}", encodedPacket);
TransportType transportType = packet.getTransportType();
if (transportType == TransportType.WEBSOCKET || transportType == TransportType.FLASHSOCKET) {
out.add(new TextWebSocketFrame(encodedPacket));
} else if (transportType == TransportType.XHR_POLLING) {
out.add(PipelineUtils.createHttpResponse(packet.getOrigin(), encodedPacket, false));
} else if (transportType == TransportType.JSONP_POLLING) {
String jsonpIndexParam = (packet.getJsonpIndexParam() != null) ? packet.getJsonpIndexParam() : "0";
String encodedStringPacket = encodedPacket.toString(CharsetUtil.UTF_8);
encodedPacket.release();
String encodedJsonpPacket = String.format(JSONP_TEMPLATE, jsonpIndexParam, encodedStringPacket);
HttpResponse httpResponse = PipelineUtils.createHttpResponse(packet.getOrigin(), PipelineUtils.copiedBuffer(ctx.alloc(), encodedJsonpPacket), true);
httpResponse.headers().add("X-XSS-Protection", "0");
