 +    static const u_char ending[] = " HTTP/3";
 +
 +    if (r->method_name.len == 0
-+        || r->schema_start == NULL
++        || r->schema.len == 0
 +        || r->unparsed_uri.len == 0)
 +    {
 +        if (r->method_name.len == 0) {
 +            ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
 +                          "client sent no :method header");
 +
-+        } else if (r->schema_start == NULL) {
++        } else if (r->schema.len == 0) {
 +            ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
 +                          "client sent no :scheme header");
 +

+
+#endif /* _NGX_HTTP_V3_MODULE_H_INCLUDED_ */
-- 
2.26.2


+        return NGX_DECLINED;
+    }
+
+    for (i = 0; i < value->len; i++) {
+        ch = value->data[i];
+
+        c = (u_char) (ch | 0x20);
+        if (c >= 'a' && c <= 'z') {
+            continue;
+        }
+
+        if (((ch >= '0' && ch <= '9') || ch == '+' || ch == '-' || ch == '.')
+            && i > 0)
+        {
+            continue;
+        }
+
+        ngx_log_error(NGX_LOG_INFO, r->connection->log, 0,
+                      "client sent invalid :scheme header: \"%V\"", value);
+
+        return NGX_DECLINED;
+    }
+
+    r->schema = *value;
+
+    return NGX_OK;
+}
