Commit aa3cc813 authored by Walid Boudebouda's avatar Walid Boudebouda Committed by Dridi Boukelmoune

vtc: More HPACK header validation coverage

Adds coverage for tab characters at start/end of field value.

Regarding the "fo o" " bar" header, it cumulates an error in the name
and another in the value, but only one of them will trigger the expected
PROTOCOL_ERROR. Only the invalid "fo o" is checked now, and the other
error is part of the new coverage.
Signed-off-by: 's avatarDridi Boukelmoune <dridi.boukelmoune@gmail.com>
parent 06f04ece
......@@ -30,6 +30,7 @@ client c1 {
stream 1 {
txreq -url ""
rxrst
expect rst.err == PROTOCOL_ERROR
} -run
} -run
......@@ -37,6 +38,7 @@ client c1 {
stream 1 {
txreq -scheme ""
rxrst
expect rst.err == PROTOCOL_ERROR
} -run
} -run
......@@ -44,6 +46,7 @@ client c1 {
stream 1 {
txreq -req ""
rxrst
expect rst.err == PROTOCOL_ERROR
} -run
} -run
......@@ -51,8 +54,9 @@ varnish v1 -vsl_catchup
client c1 {
stream 1 {
txreq -hdr "fo o" " bar"
txreq -hdr "foo" " bar"
rxrst
expect rst.err == PROTOCOL_ERROR
} -run
} -run
......@@ -60,6 +64,7 @@ client c1 {
stream 1 {
txreq -hdr "foo" " "
rxrst
expect rst.err == PROTOCOL_ERROR
} -run
} -run
......@@ -67,6 +72,7 @@ client c1 {
stream 1 {
txreq -hdr ":foo" "bar"
rxrst
expect rst.err == PROTOCOL_ERROR
} -run
} -run
......@@ -74,6 +80,7 @@ client c1 {
stream 1 {
txreq -hdr "foo" "b\x0car"
rxrst
expect rst.err == PROTOCOL_ERROR
} -run
} -run
......@@ -81,6 +88,7 @@ client c1 {
stream 1 {
txreq -hdr "f o" "bar"
rxrst
expect rst.err == PROTOCOL_ERROR
} -run
} -run
......@@ -88,6 +96,7 @@ client c1 {
stream 1 {
txreq -hdr "f: o" "bar"
rxrst
expect rst.err == PROTOCOL_ERROR
} -run
} -run
......@@ -95,5 +104,22 @@ client c1 {
stream 1 {
txreq -hdr "foo" "bar "
rxrst
expect rst.err == PROTOCOL_ERROR
} -run
} -run
client c1 {
stream 1 {
txreq -hdr "foo" " bar"
rxrst
expect rst.err == PROTOCOL_ERROR
} -run
} -run
client c1 {
stream 1 {
txreq -hdr "foo" "bar "
rxrst
expect rst.err == PROTOCOL_ERROR
} -run
} -run
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