Commit 9c85dcbb authored by Walid Boudebouda's avatar Walid Boudebouda Committed by Dridi Boukelmoune

hpack: Validate header values with vct_ishdrval()

Signed-off-by: 's avatarDridi Boukelmoune <dridi.boukelmoune@gmail.com>
parent ff52f481
......@@ -110,9 +110,9 @@ h2h_checkhdr(const struct http *hp, const char *b, size_t namelen, size_t len)
state = FLD_VALUE;
/* FALL_THROUGH */
case FLD_VALUE:
if (*p != 0x09 && (*p < 0x20 || *p == 0x7f)) {
if (!vct_ishdrval(*p)) {
VSLb(hp->vsl, SLT_BogoHeader,
"Illegal field value (control) %.*s",
"Illegal field value %.*s",
(int)(len > 20 ? 20 : len), b);
return (H2SE_PROTOCOL_ERROR);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment