BUG/MINOR: h2: ":path" must not be empty
As reported by h2spec, the h2->h1 gateway doesn't verify that ":path"
is not empty. This is harmless since the H1 parser will reject such a
request, but better fix it anyway.
To backport to 1.8.
diff --git a/src/h2.c b/src/h2.c
index 183b7c3..3c580d1 100644
--- a/src/h2.c
+++ b/src/h2.c
@@ -83,6 +83,10 @@
}
}
+ /* 7540#8.1.2.3: :path must not be empty */
+ if (!phdr[uri_idx].len)
+ goto fail;
+
if (out + phdr[H2_PHDR_IDX_METH].len + 1 + phdr[uri_idx].len + 11 > end) {
/* too large */
goto fail;