[master] e5a7775 More coverage
Poul-Henning Kamp
phk at FreeBSD.org
Mon Mar 6 16:07:06 CET 2017
commit e5a777586d7ab3341feddb5a6cf84dffc3ed9fcf
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Mar 6 08:22:38 2017 +0000
More coverage
diff --git a/bin/varnishd/http2/cache_http2_proto.c b/bin/varnishd/http2/cache_http2_proto.c
index 018c15e..1eb4b6b 100644
--- a/bin/varnishd/http2/cache_http2_proto.c
+++ b/bin/varnishd/http2/cache_http2_proto.c
@@ -680,10 +680,16 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
// XXX: later, drain rest of frame
h2->bogosity++;
VSLb(h2->vsl, SLT_Debug,
- "H2: Unknown frame type 0x%02x (ignored)", h2->rxf_type);
+ "H2: Unknown frame type 0x%02x (ignored)",
+ (uint8_t)h2->rxf_type);
return (1);
}
h2f = h2flist + h2->rxf_type;
+#if 1
+ AN(h2f->name);
+ AN(h2f->func);
+#else
+ /* If we ever get holes in the frame table... */
if (h2f->name == NULL || h2f->func == NULL) {
// rfc7540,l,679,681
// XXX: later, drain rest of frame
@@ -693,12 +699,13 @@ h2_rxframe(struct worker *wrk, struct h2_sess *h2)
h2->rxf_type);
return (0);
}
+#endif
if (h2->rxf_flags & ~h2f->flags) {
// rfc7540,l,687,688
h2->bogosity++;
VSLb(h2->vsl, SLT_Debug,
"H2: Unknown flags 0x%02x on %s (ignored)",
- h2->rxf_flags, h2f->name);
+ (uint8_t)h2->rxf_flags, h2f->name);
h2->rxf_flags &= h2f->flags;
}
diff --git a/bin/varnishtest/tests/t02003.vtc b/bin/varnishtest/tests/t02003.vtc
index 893d296..0686628 100644
--- a/bin/varnishtest/tests/t02003.vtc
+++ b/bin/varnishtest/tests/t02003.vtc
@@ -20,6 +20,7 @@ client c1 {
expect goaway.err == PROTOCOL_ERROR
} -start
stream 2 {
+ sendhex "000003 80 00 00000002 010203"
txprio
} -run
stream 0 -wait
@@ -106,7 +107,7 @@ client c1 {
client c1 {
stream 0 {
- sendhex "000008 06 00 00000001 0102030405060708"
+ sendhex "000008 06 80 00000001 0102030405060708"
rxgoaway
expect goaway.laststream == 0
expect goaway.err == PROTOCOL_ERROR
More information about the varnish-commit
mailing list