[master] bd0076f16 cache_http2_hpack: Improve usefulnes of field value check
Nils Goroll
nils.goroll at uplex.de
Sun Feb 23 17:17:05 UTC 2025
commit bd0076f16ee318e1ee0d39f424c14193ece9fd3b
Author: Nils Goroll <nils.goroll at uplex.de>
Date: Sun Feb 23 18:08:13 2025 +0100
cache_http2_hpack: Improve usefulnes of field value check
diff --git a/bin/varnishd/http2/cache_http2_hpack.c b/bin/varnishd/http2/cache_http2_hpack.c
index 694e7fc83..a90e6fde2 100644
--- a/bin/varnishd/http2/cache_http2_hpack.c
+++ b/bin/varnishd/http2/cache_http2_hpack.c
@@ -106,7 +106,8 @@ h2h_checkhdr(struct vsl_log *vsl, txt nm, txt val)
case FLD_VALUE_FIRST:
if (vct_issp(*p)) {
VSLb(vsl, SLT_BogoHeader,
- "Illegal field value start %.*s", l, nm.b);
+ "Illegal field value 0x%02x start %.*s",
+ *p, l, nm.b);
return (H2SE_PROTOCOL_ERROR);
}
state = FLD_VALUE;
@@ -114,7 +115,8 @@ h2h_checkhdr(struct vsl_log *vsl, txt nm, txt val)
case FLD_VALUE:
if (!vct_ishdrval(*p)) {
VSLb(vsl, SLT_BogoHeader,
- "Illegal field value %.*s", l, nm.b);
+ "Illegal field value 0x%02x %.*s",
+ *p, l, nm.b);
return (H2SE_PROTOCOL_ERROR);
}
break;
@@ -124,7 +126,8 @@ h2h_checkhdr(struct vsl_log *vsl, txt nm, txt val)
}
if (state == FLD_VALUE && vct_issp(val.e[-1])) {
VSLb(vsl, SLT_BogoHeader,
- "Illegal field value (end) %.*s", l, nm.b);
+ "Illegal field value 0x%02x (end) at %.*s",
+ val.e[-1], l, nm.b);
return (H2SE_PROTOCOL_ERROR);
}
return (0);
More information about the varnish-commit
mailing list