refactor: removed our own ctx->headers_sent field because we should use r->header_sent instead.