 +    send = 0;
 +
 +    blocked = 0;
++
++    while (in) {
++        off_t size = ngx_buf_size(in->buf);
++
++        if (size || in->buf->last_buf) {
++            break;
++        }
++
++        in = in->next;
++    }
++
++    if (in == NULL || stream->out_closed) {
++        return NULL;
++    }
 +
 +    while (in) {
 +        prev_send = send;

+
+#endif /* _NGX_HTTP_V3_MODULE_H_INCLUDED_ */
-- 
2.25.1


     if (ngx_event_flags & NGX_USE_KQUEUE_EVENT) {
diff --git a/src/http/v3/ngx_http_v3.c b/src/http/v3/ngx_http_v3.c
new file mode 100644
index 000000000..8221b699e
--- /dev/null
+++ b/src/http/v3/ngx_http_v3.c
@@ -0,0 +1,2174 @@
+
+/*
+ * Copyright (C) Cloudflare, Inc.
