@Override
public NextAction handleWrite(FilterChainContext ctx) throws IOException {
final Object msg = ctx.getMessage();
if (HttpPacket.isHttp(msg)) {
HttpPacket httpPacket = (HttpPacket) msg;
final HttpRequestPacket request = (HttpRequestPacket) httpPacket.getHttpHeader();
if (!request.isCommitted()) {
HttpTxContext context = HttpTxContext.get(ctx);
assert (context != null);
Request req = context.getRequest();
if (!secure) {