[master] 3a4532b Add gquintar's HTTP2 "internal" varnishtest cases.

Poul-Henning Kamp phk at FreeBSD.org
Mon Sep 5 08:09:08 CEST 2016


commit 3a4532bfa68ac7f90a5c390d811346fc62d700c7
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Mon Sep 5 06:07:29 2016 +0000

    Add gquintar's HTTP2 "internal" varnishtest cases.
    
    White-space polishing and fix extraneous 'd' appended to expect
    values in previous commit.

diff --git a/bin/varnishtest/tests/README b/bin/varnishtest/tests/README
index 971ee3d..80075ea 100644
--- a/bin/varnishtest/tests/README
+++ b/bin/varnishtest/tests/README
@@ -13,19 +13,18 @@ Naming scheme
 
 		[id]%05d.vtc
 
-	id ~ [a] --> varnishtest(1) tests
-	id ~ [b] --> Basic functionality tests
-	id ~ [c] --> Complex functionality tests
-	id ~ [d] --> Director VMOD tests
-	id ~ [e] --> ESI tests
-	id ~ [g] --> GZIP tests
-	id ~ [j] --> JAIL tests
-	id ~ [l] --> VSL tests
-	id ~ [m] --> VMOD tests excluding director
-	id ~ [o] --> prOxy protocol
-	id ~ [p] --> Persistent tests
-	id ~ [r] --> Regression tests, same number as ticket
-	id ~ [s] --> Slow tests, expiry, grace etc.
-	id ~ [t] --> sTreaming tests
-	id ~ [u] --> Unusual background processes
-	id ~ [v] --> VCL tests: execute VRT functions
+	id ~ ^a --> varnishtest(1) tests
+	id ~ ^b --> Basic functionality tests
+	id ~ ^c --> Complex functionality tests
+	id ~ ^d --> Director VMOD tests
+	id ~ ^e --> ESI tests
+	id ~ ^g --> GZIP tests
+	id ~ ^j --> JAIL tests
+	id ~ ^l --> VSL tests
+	id ~ ^m --> VMOD tests excluding director
+	id ~ ^o --> prOxy protocol
+	id ~ ^p --> Persistent tests
+	id ~ ^r --> Regression tests, same number as ticket
+	id ~ ^s --> Slow tests, expiry, grace etc.
+	id ~ ^u --> Unusual background processes
+	id ~ ^v --> VCL tests: execute VRT functions
diff --git a/bin/varnishtest/tests/a02000.vtc b/bin/varnishtest/tests/a02000.vtc
new file mode 100644
index 0000000..c272dac
--- /dev/null
+++ b/bin/varnishtest/tests/a02000.vtc
@@ -0,0 +1,50 @@
+varnishtest "Close/accept after H/2 upgrade"
+
+server s1 {
+	stream 1 {
+		rxreq
+		txresp
+	} -run
+
+	expect_close
+	accept
+
+	rxreq
+	txresp
+
+	close
+	accept
+
+	rxreq
+	txresp
+
+	stream 1 {
+		rxreq
+		txresp
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq
+		rxresp
+	} -run
+} -run
+
+client c1 -connect ${s1_sock} {
+	txreq
+	rxresp
+
+} -run
+
+client c1 -connect ${s1_sock} {
+	txreq
+	rxresp
+
+	stream 1 {
+		txreq
+		rxresp
+	} -run
+} -run
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02001.vtc b/bin/varnishtest/tests/a02001.vtc
new file mode 100644
index 0000000..3329579
--- /dev/null
+++ b/bin/varnishtest/tests/a02001.vtc
@@ -0,0 +1,96 @@
+varnishtest "Quickly test all frames"
+
+server s1 {
+	rxpri
+	stream 0 {
+# PRIO
+		txprio -stream 23456 -weight 123
+
+# RST
+		txrst -err 2
+
+# SETTINGS
+		txsettings -push true -hdrtbl 11111111 -maxstreams 222222 -winsize 333333 -framesize 444444 -hdrsize 555555
+		txsettings -ack
+
+# PING
+		txping -data "01234567"
+		txping -data "abcdefgh" -ack
+
+# GOAWAY
+		txgoaway -laststream 17432423 -err 12 -debug "kangaroo"
+
+# WINUP
+		txwinup -size 500
+
+
+# FRAME
+		txresp -body "floubidou"
+
+
+# FRAME
+		txresp -body "tata"
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	txpri
+	stream 0 {
+# PRIO
+		rxprio
+		expect prio.stream == 23456
+		expect prio.weight == 123
+
+# RST
+		rxrst
+		expect rst.err >= 2
+		expect rst.err < 3
+
+# SETTINGS
+		rxsettings
+		expect settings.hdrtbl == 11111111
+		expect settings.maxstreams == 222222
+		expect settings.winsize == 333333
+		expect settings.framesize == 444444
+		expect settings.hdrsize == 555555
+
+		rxsettings
+		expect settings.ack == true
+		expect settings.hdrtbl == <undef>
+		expect settings.maxstreams == <undef>
+		expect settings.winsize == <undef>
+		expect settings.framesize == <undef>
+		expect settings.hdrsize == <undef>
+
+# PING
+		rxping
+		expect ping.ack == "false"
+		expect ping.data == "01234567"
+		expect ping.data != "O1234567"
+		rxping
+		expect ping.ack == "true"
+		expect ping.data == "abcdefgh"
+		expect ping.data != "abcdefgt"
+
+# GOAWAY
+		rxgoaway
+		expect goaway.err == 12
+		expect goaway.laststream == 17432423
+		expect goaway.debug == "kangaroo"
+
+# WINUP
+		rxwinup
+		expect winup.size == 500
+
+# FRAME
+		rxhdrs
+		rxdata
+		expect frame.data == "floubidou"
+		expect frame.type == 0
+		expect frame.size == 9
+		expect frame.stream == 0
+
+		rxresp
+		expect resp.body == "floubidoutata"
+	} -run
+} -run
diff --git a/bin/varnishtest/tests/a02002.vtc b/bin/varnishtest/tests/a02002.vtc
new file mode 100644
index 0000000..5f11fbf
--- /dev/null
+++ b/bin/varnishtest/tests/a02002.vtc
@@ -0,0 +1,20 @@
+varnishtest "Trigger a compression error via bad index"
+
+server s1 {
+	non-fatal
+	stream 1 {
+		rxreq
+		expect req.http.foo == <undef>
+		txgoaway -laststream 0 -err 9 -debug "COMPRESSION_ERROR"
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq -idxHdr 100 -litHdr inc plain "foo" plain "bar"
+		rxgoaway
+		expect goaway.err == 9
+		expect goaway.laststream == 0
+		expect goaway.debug == "COMPRESSION_ERROR"
+	} -run
+} -run
diff --git a/bin/varnishtest/tests/a02003.vtc b/bin/varnishtest/tests/a02003.vtc
new file mode 100644
index 0000000..6e0bb50
--- /dev/null
+++ b/bin/varnishtest/tests/a02003.vtc
@@ -0,0 +1,17 @@
+varnishtest "Check bodylen"
+
+server s1 {
+	stream 1 {
+		rxreq
+		expect req.bodylen == 3
+		txresp -bodylen 7
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq -bodylen 3
+		rxresp
+		expect resp.bodylen == 7
+	} -run
+} -run
diff --git a/bin/varnishtest/tests/a02004.vtc b/bin/varnishtest/tests/a02004.vtc
new file mode 100644
index 0000000..992b8a1
--- /dev/null
+++ b/bin/varnishtest/tests/a02004.vtc
@@ -0,0 +1,16 @@
+varnishtest "Simple request with body"
+
+server s1 {
+	stream 1 {
+		rxreq
+		txresp -body "bob"
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq
+		rxresp
+		expect resp.bodylen == 3
+	} -run
+} -run
diff --git a/bin/varnishtest/tests/a02005.vtc b/bin/varnishtest/tests/a02005.vtc
new file mode 100644
index 0000000..986a072
--- /dev/null
+++ b/bin/varnishtest/tests/a02005.vtc
@@ -0,0 +1,36 @@
+varnishtest "Continuation frames"
+
+server s1 {
+	stream 1 {
+		rxreq
+		txresp -nohdrend
+		txcont -nohdrend -hdr "foo" "bar"
+		txcont	   -hdr "baz" "qux"
+	} -run
+	stream 3 {
+		rxreq
+		txresp -nohdrend
+		txcont -nohdrend -hdr "foo2" "bar2"
+		txcont	   -hdr "baz2" "qux2"
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq
+		rxhdrs -all
+		expect resp.http.foo == "bar"
+		expect resp.http.baz == "qux"
+	} -run
+	stream 3 {
+		txreq
+		rxhdrs -some 2
+		expect resp.http.foo2 == <undef>
+		expect resp.http.baz2 == <undef>
+		rxcont
+		expect resp.http.foo2 == "bar2"
+		expect resp.http.baz2 == "qux2"
+	} -run
+} -run
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02006.vtc b/bin/varnishtest/tests/a02006.vtc
new file mode 100644
index 0000000..e6ee7d4
--- /dev/null
+++ b/bin/varnishtest/tests/a02006.vtc
@@ -0,0 +1,40 @@
+varnishtest "Keep track of window credits"
+
+server s1 {
+	stream 2 {
+		rxreq
+		txresp -nohdrend
+		txcont -nohdrend -hdr "foo" "bar"
+		txcont -hdr "baz" "qux"
+		txdata -data "foo"
+		txdata -data "bar"
+	} -run
+
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 0 {
+		expect stream.window == 65535
+	} -run
+	stream 2 {
+		expect stream.window == 65535
+		txreq
+		rxhdrs
+		rxcont
+		rxcont
+		expect resp.http.:status == "200"
+		expect resp.http.foo == "bar"
+		expect stream.window == 65535
+		rxdata
+		expect stream.window == 65532
+		rxdata
+		expect stream.window == 65529
+		expect resp.body == "foobar"
+		expect resp.http.baz == "qux"
+	} -run
+	stream 0 {
+		expect stream.window == 65529
+	} -run
+} -run
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02007.vtc b/bin/varnishtest/tests/a02007.vtc
new file mode 100644
index 0000000..7d1be92
--- /dev/null
+++ b/bin/varnishtest/tests/a02007.vtc
@@ -0,0 +1,79 @@
+varnishtest "HPACK test"
+
+server s1 {
+	stream 1 {
+		rxreq
+		expect tbl.dec.size == 57
+		expect tbl.dec[1].key == ":authority"
+		expect tbl.dec[1].value == "www.example.com"
+		txresp
+	} -run
+
+	stream 3 {
+		rxreq
+		expect tbl.dec[1].key == "cache-control"
+		expect tbl.dec[1].value == "no-cache"
+		expect tbl.dec[2].key == ":authority"
+		expect tbl.dec[2].value == "www.example.com"
+		expect tbl.dec.size == 110
+		txresp
+	} -run
+
+	stream 5 {
+		rxreq
+		expect tbl.dec[1].key == "custom-key"
+		expect tbl.dec[1].value == "custom-value"
+		expect tbl.dec[2].key == "cache-control"
+		expect tbl.dec[2].value == "no-cache"
+		expect tbl.dec[3].key == ":authority"
+		expect tbl.dec[3].value == "www.example.com"
+		expect tbl.dec.size == 164
+		txresp
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+
+		txreq -idxHdr 2 \
+			-idxHdr 6 \
+			-idxHdr 4 \
+			-litIdxHdr inc 1 huf "www.example.com"
+		expect tbl.enc[1].key == ":authority"
+		expect tbl.enc[1].value == "www.example.com"
+		rxresp
+	} -run
+
+	stream 3 {
+		txreq -idxHdr 2 \
+			-idxHdr 6 \
+			-idxHdr 4 \
+			-idxHdr 62 \
+			-litIdxHdr inc 24 huf no-cache
+		expect tbl.enc[1].key == "cache-control"
+		expect tbl.enc[1].value == "no-cache"
+		expect tbl.enc[2].key == ":authority"
+		expect tbl.enc[2].value == "www.example.com"
+		expect tbl.enc.size == 110
+		rxresp
+	} -run
+
+	stream 5 {
+		txreq -idxHdr 2 \
+			-idxHdr 7 \
+			-idxHdr 5 \
+			-idxHdr 63 \
+			-litHdr inc huf "custom-key" huf "custom-value"
+		expect tbl.enc[1].key == "custom-key"
+		expect tbl.enc[1].value == "custom-value"
+		expect tbl.enc[2].key == "cache-control"
+		expect tbl.enc[2].value == "no-cache"
+		expect tbl.enc[3].key == ":authority"
+		expect tbl.enc[3].value == "www.example.com"
+		expect tbl.enc.size == 164
+		rxresp
+	} -run
+
+} -run
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02008.vtc b/bin/varnishtest/tests/a02008.vtc
new file mode 100644
index 0000000..0c0c402
--- /dev/null
+++ b/bin/varnishtest/tests/a02008.vtc
@@ -0,0 +1,118 @@
+varnishtest "HPACK test"
+
+server s1 {
+	stream 0 {
+		txsettings -hdrtbl 256
+		rxsettings
+		txsettings -ack
+		rxsettings
+		expect settings.ack == true
+	} -run
+
+	stream 1 {
+		rxreq
+		expect tbl.dec[1].key == "location"
+		expect tbl.dec[1].value == "https://www.example.com"
+		expect tbl.dec[2].key == "date"
+		expect tbl.dec[2].value == "Mon, 21 Oct 2013 20:13:21 GMT"
+		expect tbl.dec[3].key == "cache-control"
+		expect tbl.dec[3].value == "private"
+		expect tbl.dec[4].key == ":status"
+		expect tbl.dec[4].value == "302"
+		expect tbl.dec.size == 222
+		txresp
+	} -run
+
+	stream 3 {
+		rxreq
+		expect tbl.dec[1].key == ":status"
+		expect tbl.dec[1].value == "307"
+		expect tbl.dec[2].key == "location"
+		expect tbl.dec[2].value == "https://www.example.com"
+		expect tbl.dec[3].key == "date"
+		expect tbl.dec[3].value == "Mon, 21 Oct 2013 20:13:21 GMT"
+		expect tbl.dec[4].key == "cache-control"
+		expect tbl.dec[4].value == "private"
+		expect tbl.dec.size == 222
+		txresp
+	} -run
+
+	stream 5 {
+		rxreq
+		expect tbl.dec[1].key == "set-cookie"
+		expect tbl.dec[1].value == "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"
+		expect tbl.dec[2].key == "content-encoding"
+		expect tbl.dec[2].value == "gzip"
+		expect tbl.dec[3].key == "date"
+		expect tbl.dec[3].value == "Mon, 21 Oct 2013 20:13:22 GMT"
+		expect tbl.dec.size == 215
+		txresp
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 0 {
+		txsettings -hdrtbl 256
+		rxsettings
+		txsettings -ack
+		rxsettings
+		expect settings.ack == true
+	} -run
+
+	stream 1 {
+
+		txreq \
+			-litIdxHdr inc 8 plain "302" \
+			-litIdxHdr inc 24 plain "private" \
+			-litIdxHdr inc 33 plain "Mon, 21 Oct 2013 20:13:21 GMT" \
+			-litIdxHdr inc 46 plain "https://www.example.com"
+		expect tbl.enc[1].key == "location"
+		expect tbl.enc[1].value == "https://www.example.com"
+		expect tbl.enc[2].key == "date"
+		expect tbl.enc[2].value == "Mon, 21 Oct 2013 20:13:21 GMT"
+		expect tbl.enc[3].key == "cache-control"
+		expect tbl.enc[3].value == "private"
+		expect tbl.enc[4].key == ":status"
+		expect tbl.enc[4].value == "302"
+		expect tbl.enc.size == 222
+		rxresp
+	} -run
+
+	stream 3 {
+		txreq \
+			-litIdxHdr inc 8 huf "307" \
+			-idxHdr 65 \
+			-idxHdr 64 \
+			-idxHdr 63
+		expect tbl.enc[1].key == ":status"
+		expect tbl.enc[1].value == "307"
+		expect tbl.enc[2].key == "location"
+		expect tbl.enc[2].value == "https://www.example.com"
+		expect tbl.enc[3].key == "date"
+		expect tbl.enc[3].value == "Mon, 21 Oct 2013 20:13:21 GMT"
+		expect tbl.enc[4].key == "cache-control"
+		expect tbl.enc[4].value == "private"
+		expect tbl.enc.size == 222
+		rxresp
+	} -run
+
+	stream 5 {
+		txreq -idxHdr 8 \
+			-idxHdr 65 \
+			-litIdxHdr inc 33 plain "Mon, 21 Oct 2013 20:13:22 GMT" \
+			-idxHdr 64 \
+			-litIdxHdr inc 26 plain "gzip" \
+			-litIdxHdr inc 55 plain "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"
+		expect tbl.enc[1].key == "set-cookie"
+		expect tbl.enc[1].value == "foo=ASDJKHQKBZXOQWEOPIUAXQWEOIU; max-age=3600; version=1"
+		expect tbl.enc[2].key == "content-encoding"
+		expect tbl.enc[2].value == "gzip"
+		expect tbl.enc[3].key == "date"
+		expect tbl.enc[3].value == "Mon, 21 Oct 2013 20:13:22 GMT"
+		expect tbl.enc.size == 215
+		rxresp
+	} -run
+
+} -run
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02009.vtc b/bin/varnishtest/tests/a02009.vtc
new file mode 100644
index 0000000..8668cb9
--- /dev/null
+++ b/bin/varnishtest/tests/a02009.vtc
@@ -0,0 +1,78 @@
+varnishtest "More HPACK tests"
+server s1 {
+	stream 1 {
+		rxreq
+		expect tbl.dec.size == 57
+		expect tbl.dec[1].key == ":authority"
+		expect tbl.dec[1].value == "www.example.com"
+		txresp
+	} -run
+
+	stream 3 {
+		rxreq
+		expect tbl.dec[1].key == "cache-control"
+		expect tbl.dec[1].value == "no-cache"
+		expect tbl.dec[2].key == ":authority"
+		expect tbl.dec[2].value == "www.example.com"
+		expect tbl.dec.size == 110
+		txresp
+	} -run
+
+	stream 5 {
+		rxreq
+		expect tbl.dec[1].key == "custom-key"
+		expect tbl.dec[1].value == "custom-value"
+		expect tbl.dec[2].key == "cache-control"
+		expect tbl.dec[2].value == "no-cache"
+		expect tbl.dec[3].key == ":authority"
+		expect tbl.dec[3].value == "www.example.com"
+		expect tbl.dec.size == 164
+		txresp
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+
+		txreq -idxHdr 2 \
+			-idxHdr 6 \
+			-idxHdr 4 \
+			-litIdxHdr inc 1 huf "www.example.com"
+		expect tbl.enc[1].key == ":authority"
+		expect tbl.enc[1].value == "www.example.com"
+		rxresp
+	} -run
+
+	stream 3 {
+		txreq -idxHdr 2 \
+			-idxHdr 6 \
+			-idxHdr 4 \
+			-idxHdr 62 \
+			-litIdxHdr inc 24 huf no-cache
+		expect tbl.enc[1].key == "cache-control"
+		expect tbl.enc[1].value == "no-cache"
+		expect tbl.enc[2].key == ":authority"
+		expect tbl.enc[2].value == "www.example.com"
+		expect tbl.enc.size == 110
+		rxresp
+	} -run
+
+	stream 5 {
+		txreq -idxHdr 2 \
+			-idxHdr 7 \
+			-idxHdr 5 \
+			-idxHdr 63 \
+			-litHdr inc huf "custom-key" huf "custom-value"
+		expect tbl.enc[1].key == "custom-key"
+		expect tbl.enc[1].value == "custom-value"
+		expect tbl.enc[2].key == "cache-control"
+		expect tbl.enc[2].value == "no-cache"
+		expect tbl.enc[3].key == ":authority"
+		expect tbl.enc[3].value == "www.example.com"
+		expect tbl.enc.size == 164
+		rxresp
+	} -run
+
+} -run
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02010.vtc b/bin/varnishtest/tests/a02010.vtc
new file mode 100644
index 0000000..adf12d3
--- /dev/null
+++ b/bin/varnishtest/tests/a02010.vtc
@@ -0,0 +1,40 @@
+varnishtest "Verify the initial window size"
+
+server s1 {
+	stream 0 {
+		rxsettings
+		txsettings -ack
+	} -run
+	stream 1 {
+		rxreq
+		txresp -bodylen 100
+	} -run
+	stream 0 {
+		rxsettings
+		txsettings -ack
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 0 {
+		txsettings -winsize 128
+		rxsettings
+	} -run
+	stream 1 {
+		txreq
+		rxresp
+		expect resp.bodylen == 100
+		expect stream.window == 28
+	} -run
+	stream 0 {
+		txsettings -winsize 64
+		rxsettings
+
+		expect stream.window == 65435
+	} -run
+	stream 1 {
+		expect stream.window == -36
+	} -run
+} -run
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02011.vtc b/bin/varnishtest/tests/a02011.vtc
new file mode 100644
index 0000000..031bc40
--- /dev/null
+++ b/bin/varnishtest/tests/a02011.vtc
@@ -0,0 +1,22 @@
+varnishtest "overflow"
+
+server s1 {
+	stream 1 {
+		rxreq
+		txresp -hdr long-header-original1 original1 \
+			-hdr long-header-original2 original2 \
+			-hdr long-header-original3 original3 \
+			-hdr long-header-original4 original4
+	} -run
+} -start
+
+client c1  -connect ${s1_sock} {
+	stream 1 {
+		txreq -req GET \
+			-url / \
+			-hdr :scheme http \
+			-hdr :authority localhost
+		rxresp
+		expect resp.http.:status == 200
+	} -run
+} -run
diff --git a/bin/varnishtest/tests/a02012.vtc b/bin/varnishtest/tests/a02012.vtc
new file mode 100644
index 0000000..76ad72d
--- /dev/null
+++ b/bin/varnishtest/tests/a02012.vtc
@@ -0,0 +1,56 @@
+varnishtest "padded DATA frames"
+
+server s1 {
+	stream 1 {
+		rxreq
+		# HDR indexed ":status: 200" + 2 padding bytes
+		sendhex "00 00 04 01 0c 00 00 00 01 02 88 12 34"
+		# DATA "foo" + 4 padding bytes
+		sendhex "00 00 08 00 09 00 00 00 01 04 66 6f 6f 6e 6e 6e 6e"
+
+	} -run
+
+	stream 3 {
+		rxreq
+		txresp -nostrend
+		txdata -data "bull" -pad "frog" -nostrend
+		txdata -data "terrier" -padlen 17
+		txdata -datalen 4 -padlen 2
+	} -run
+
+	stream 5 {
+		rxreq
+		txresp -pad "pwepew"
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq
+		rxresp
+		expect resp.bodylen == 3
+		expect resp.body == "foo"
+	} -run
+
+	stream 3 {
+		txreq
+		rxhdrs
+
+		rxdata
+		expect frame.size == 9
+		expect resp.body == "bull"
+
+		rxdata
+		expect frame.size == 25
+		expect resp.body == "bullterrier"
+
+		rxdata
+		expect frame.size == 7
+	} -run
+
+	stream 5 {
+		txreq
+		rxresp
+		expect frame.padding == 6
+	} -run
+} -run
diff --git a/bin/varnishtest/tests/a02013.vtc b/bin/varnishtest/tests/a02013.vtc
new file mode 100644
index 0000000..51d3a80
--- /dev/null
+++ b/bin/varnishtest/tests/a02013.vtc
@@ -0,0 +1,15 @@
+varnishtest "H/2 state after sending/receiving preface"
+
+server s1 {
+	expect h2.state == false
+	rxpri
+	expect h2.state == true
+} -start
+
+client c1 -connect ${s1_sock} {
+	expect h2.state == false
+	txpri
+	expect h2.state == true
+} -start
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02014.vtc b/bin/varnishtest/tests/a02014.vtc
new file mode 100644
index 0000000..d11af49
--- /dev/null
+++ b/bin/varnishtest/tests/a02014.vtc
@@ -0,0 +1,52 @@
+varnishtest "priority"
+
+server s1 {
+	stream 1 {
+		rxreq
+		txresp
+		expect stream.weight == 16
+		expect stream.dependency == 0
+	} -run
+	stream 3 {
+		rxreq
+		txresp
+		expect stream.weight == 123
+		expect stream.dependency == 5
+
+		rxprio
+		expect prio.weight == 10
+		expect prio.stream == 7
+		expect stream.weight == 10
+		expect stream.dependency == 7
+	} -run
+} -start
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq -req GET -url /1 \
+			-hdr :scheme http -hdr :authority localhost
+		rxresp
+		expect stream.weight == 16
+		expect stream.dependency == 0
+	} -run
+	stream 3 {
+		txreq -req GET -url /3 \
+			-hdr :scheme http -hdr :authority localhost \
+			-weight 123 -ex -dep 5
+		rxresp
+		expect stream.weight == 123
+		expect stream.dependency == 5
+
+		txprio -weight 10 -stream 7
+		expect stream.weight == 10
+		expect stream.dependency == 7
+	} -run
+	stream 5 {
+		expect stream.weight == 16
+		expect stream.dependency == 0
+	} -run
+	stream 0 {
+		expect stream.weight == <undef>
+		expect stream.dependency == <undef>
+	} -run
+} -run
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02015.vtc b/bin/varnishtest/tests/a02015.vtc
new file mode 100644
index 0000000..9af3a7a
--- /dev/null
+++ b/bin/varnishtest/tests/a02015.vtc
@@ -0,0 +1,63 @@
+varnishtest "exclusive dependency"
+
+server s1 {
+	stream 1 {
+		rxreq
+		txresp
+	} -run
+	stream 3 {
+		rxreq
+		txresp
+	} -run
+	stream 5 {
+		rxreq
+		txresp
+		expect stream.dependency == 0
+	} -run
+
+	stream 1 {
+		expect stream.dependency == 5
+	} -run
+	stream 3 {
+		expect stream.dependency == 5
+	} -run
+
+	stream 1 {
+		rxprio
+	} -run
+	stream 5 {
+		expect stream.dependency == 1
+	} -run
+
+} -start
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq
+		rxresp
+	} -run
+	stream 3 {
+		txreq
+		rxresp
+	} -run
+	stream 5 {
+		txreq -req GET -ex
+		expect stream.dependency == 0
+		rxresp
+	} -run
+
+	stream 1 {
+		expect stream.dependency == 5
+	} -run
+	stream 3 {
+		expect stream.dependency == 5
+	} -run
+
+	stream 1 {
+		txprio -stream 0 -ex
+	} -run
+	stream 5 {
+		expect stream.dependency == 1
+	} -run
+} -run
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02016.vtc b/bin/varnishtest/tests/a02016.vtc
new file mode 100644
index 0000000..ea06e33
--- /dev/null
+++ b/bin/varnishtest/tests/a02016.vtc
@@ -0,0 +1,37 @@
+varnishtest "Test pseudo-headers inspection"
+
+server s1 {
+	stream 1 {
+		rxreq
+
+		expect req.url == "/foo"
+		expect req.http.:path == "/foo"
+
+		expect req.method == "NOTGET"
+		expect req.http.:method == "NOTGET"
+
+		expect req.authority == "bar"
+		expect req.http.:authority == "bar"
+
+		expect req.scheme == "baz"
+		expect req.http.:scheme == "baz"
+
+		txresp -status 123
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq -url "/foo" \
+			-req "NOTGET" \
+			-hdr ":authority" "bar" \
+			-scheme "baz"
+
+		rxresp
+
+		expect resp.status == 123
+		expect resp.http.:status == 123
+	} -run
+} -start
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02017.vtc b/bin/varnishtest/tests/a02017.vtc
new file mode 100644
index 0000000..c0374f7
--- /dev/null
+++ b/bin/varnishtest/tests/a02017.vtc
@@ -0,0 +1,22 @@
+varnishtest "Push promise"
+
+server s1 {
+	stream 1 {
+		rxreq
+		txpush -promised 2 -url "/hereyougo"
+		txresp
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq
+		rxpush
+		expect push.id == 2
+		expect req.url == "/hereyougo"
+		expect req.method == "GET"
+		rxresp
+	} -run
+} -run
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02018.vtc b/bin/varnishtest/tests/a02018.vtc
new file mode 100644
index 0000000..7c281df
--- /dev/null
+++ b/bin/varnishtest/tests/a02018.vtc
@@ -0,0 +1,21 @@
+varnishtest "H/2 state after sending/receiving preface"
+
+server s1 {
+	expect h2.state == "false"
+	stream 1 {
+		rxreq
+		txresp
+	} -run
+	expect h2.state == "true"
+} -start
+
+client c1 -connect ${s1_sock} {
+	expect h2.state == "false"
+	stream 1 {
+		txreq
+		rxresp
+	} -run
+	expect h2.state == "true"
+} -start
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02019.vtc b/bin/varnishtest/tests/a02019.vtc
new file mode 100644
index 0000000..712d93e
--- /dev/null
+++ b/bin/varnishtest/tests/a02019.vtc
@@ -0,0 +1,23 @@
+varnishtest "Static table encoding"
+server s1 {
+	stream 1 {
+		rxreq
+		expect req.http.:path == "/index.html"
+		txresp
+	} -run
+
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+
+		txreq -idxHdr 2 \
+			-idxHdr 6 \
+			-idxHdr 5
+		rxresp
+	} -run
+
+
+} -run
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02020.vtc b/bin/varnishtest/tests/a02020.vtc
new file mode 100644
index 0000000..244abb6
--- /dev/null
+++ b/bin/varnishtest/tests/a02020.vtc
@@ -0,0 +1,41 @@
+varnishtest "Reduce dynamic table while incoming headers are flying"
+
+server s1 {
+	stream 1 {
+		rxreq
+		txresp -litHdr inc plain hoge plain fuga
+		expect tbl.enc[1].key == "hoge"
+		expect tbl.enc[1].value == "fuga"
+		expect tbl.enc.size == 40
+
+	} -run
+
+
+	stream 3 {
+		rxreq
+		txresp -idxHdr 62 -litHdr inc plain "foo" plain "bar"
+	} -run
+
+	stream 0 { rxsettings	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq
+		rxresp
+		expect tbl.dec[1].key == "hoge"
+		expect tbl.dec[1].value == "fuga"
+		expect tbl.dec.size == 40
+		expect tbl.dec.length == 1
+	} -run
+
+	stream 3 { txreq		} -run
+	stream 0 { txsettings -hdrtbl 0 } -run
+
+	non-fatal
+	stream 3 {
+		rxresp
+		expect resp.http.foo == <undef>
+	} -run
+
+} -run
diff --git a/bin/varnishtest/tests/a02021.vtc b/bin/varnishtest/tests/a02021.vtc
new file mode 100644
index 0000000..a04265f
--- /dev/null
+++ b/bin/varnishtest/tests/a02021.vtc
@@ -0,0 +1,52 @@
+varnishtest "Reduce dynamic table size"
+
+server s1 {
+	stream 1 {
+		rxreq
+		txresp  -litHdr inc plain hoge plain fuga
+		expect tbl.dec.size == 57
+		expect tbl.enc.size == 40
+	} -run
+
+	stream 0 {
+		rxsettings
+		txsettings -ack
+	} -run
+
+	stream 3 {
+		rxreq
+		expect tbl.dec.size == 110
+		expect tbl.enc.size == 0
+		txresp
+	} -run
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq -idxHdr 2 \
+			-idxHdr 6 \
+			-idxHdr 4 \
+			-litIdxHdr inc 1 huf "www.example.com"
+		rxresp
+		expect tbl.dec.size == 40
+		expect tbl.enc.size == 57
+	} -run
+
+	stream 0 {
+		txsettings -hdrtbl 0
+		rxsettings
+	} -run
+
+	stream 3 {
+		txreq -idxHdr 2 \
+			-idxHdr 6 \
+			-idxHdr 4 \
+			-idxHdr 62 \
+			-litIdxHdr inc 24 huf no-cache
+		expect tbl.enc.size == 110
+		expect tbl.dec.size == 0
+		rxresp
+	} -run
+} -run
+
+server s1 -wait
diff --git a/bin/varnishtest/tests/a02022.vtc b/bin/varnishtest/tests/a02022.vtc
new file mode 100644
index 0000000..0c34071
--- /dev/null
+++ b/bin/varnishtest/tests/a02022.vtc
@@ -0,0 +1,21 @@
+varnishtest "H/1 -> H/2 upgrade"
+
+server s1 {
+	rxreq
+	upgrade
+
+	stream 3 { rxprio } -run
+	stream 5 { rxprio } -run
+	stream 7 { rxprio } -run
+	stream 9 { rxprio } -run
+	stream 11 { rxprio } -run
+
+	stream 1 {
+		rxprio
+		txresp
+	} -start
+
+} -start
+
+
+shell { nghttp http://${s1_addr}:${s1_port} -nu }
diff --git a/bin/varnishtest/tests/a02023.vtc b/bin/varnishtest/tests/a02023.vtc
new file mode 100644
index 0000000..3cbc94d
--- /dev/null
+++ b/bin/varnishtest/tests/a02023.vtc
@@ -0,0 +1,44 @@
+varnishtest "Window update"
+
+server s1 {
+	stream 1 {
+		rxreq
+		txresp -body "bob"
+	} -run
+	stream 3 {
+		rxreq
+		txresp -nohdrend
+		txcont -nohdrend -hdr "foo" "bar"
+		txcont	   -hdr "baz" "qux"
+		txdata -data "foo"
+		txdata -data "bar"
+	} -run
+
+} -start
+
+client c1 -connect ${s1_sock} {
+	stream 1 {
+		txreq
+		rxresp
+		expect resp.bodylen == 3
+	} -run
+	stream 3 {
+		txreq
+		rxhdrs
+		rxcont
+		rxcont
+		expect resp.http.:status == "200"
+		expect resp.http.foo == "bar"
+		expect stream.window == 65535
+
+		rxdata
+		expect stream.window == 65532
+
+		rxdata
+		expect stream.window == 65529
+		expect resp.body == "foobar"
+		expect resp.http.baz == "qux"
+	} -run
+} -run
+
+server s1 -wait
diff --git a/bin/varnishtest/vtc_h2_hpack.c b/bin/varnishtest/vtc_h2_hpack.c
index 63034fd..a378966 100644
--- a/bin/varnishtest/vtc_h2_hpack.c
+++ b/bin/varnishtest/vtc_h2_hpack.c
@@ -111,8 +111,8 @@ huff_encode(struct hpk_iter *iter, const char *str, int len)
 	int pl = 0; /* pack length*/
 	uint32_t	v;
 	uint8_t		s;
-	
-	assert(iter->buf < iter->end); 
+
+	assert(iter->buf < iter->end);
 
 	while (len--) {
 		v = coding_table[(uint8_t)*str].val;
@@ -279,7 +279,7 @@ str_decode(struct hpk_iter *iter, struct txt *t)
 
 	t->ptr[num] = '\0';
 	t->len = num;
-	
+
 	return (ITER_DONE(iter));
 }
 
diff --git a/bin/varnishtest/vtc_http.c b/bin/varnishtest/vtc_http.c
index 3c85f50..1dad7a5 100644
--- a/bin/varnishtest/vtc_http.c
+++ b/bin/varnishtest/vtc_http.c
@@ -1047,7 +1047,7 @@ cmd_http_upgrade(CMD_ARGS)
 
 	h = http_find_header(hp->req, "Connection");
 	if (!h || strcmp(h, "Upgrade, HTTP2-Settings"))
-		vtc_log(vl, 0, "Req misses \"Connection: " 
+		vtc_log(vl, 0, "Req misses \"Connection: "
 			"Upgrade, HTTP2-Settings\" header");
 
 	h = http_find_header(hp->req, "HTTP2-Settings");
diff --git a/bin/varnishtest/vtc_http2.c b/bin/varnishtest/vtc_http2.c
index 224b308..b8a0349 100644
--- a/bin/varnishtest/vtc_http2.c
+++ b/bin/varnishtest/vtc_http2.c
@@ -99,7 +99,7 @@ struct stream {
 	char			*name;
 	VTAILQ_ENTRY(stream)    list;
 	unsigned		running;
-	pthread_cond_t          cond;
+	pthread_cond_t		cond;
 	struct frame		*frame;
 	pthread_t		tp;
 	unsigned		reading;
@@ -210,10 +210,10 @@ VTAILQ_HEAD(fq_head, frame);
 struct frame {
 	unsigned	magic;
 #define	FRAME_MAGIC	0x5dd3ec4
-	uint32_t        size;
+	uint32_t	size;
 	uint32_t	stid;
-	uint8_t         type;
-	uint8_t         flags;
+	uint8_t		type;
+	uint8_t		flags;
 	char		*data;
 
 	VTAILQ_ENTRY(frame)    list;
@@ -347,10 +347,10 @@ exclusive_stream_dependency(const struct stream *s)
 {
 	struct stream *target = NULL;
 	struct http *hp = s->hp;
-	
+
 	if (s->id == 0)
 		return;
-	
+
 	VTAILQ_FOREACH(target, &hp->streams, list) {
 		if (target->id != s->id && target->dependency == s->dependency)
 			target->dependency = s->id;
@@ -845,7 +845,7 @@ do {									       \
 	STRTOU32(n, *sp, p, v, c);					       \
 	if (l && n >= (1 << l))						       \
 		vtc_log(v, 0, c " must be a %d-bits integer (found %s)",       \
-			       l, *sp);				       \
+			       l, *sp);					       \
 } while (0)
 
 #define CHECK_LAST_FRAME(TYPE) \
@@ -908,9 +908,9 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
 	n = 0;
 	/* SECTION: stream.spec.zexpect.ping PING specific
 	 * ping.data
-	 *         The 8-bytes string of the PING frame payload.
+	 *	The 8-bytes string of the PING frame payload.
 	 * ping.ack (PING)
-	 *         "true" if the ACK flag was set, "false" otherwise.
+	 *	"true" if the ACK flag was set, "false" otherwise.
 	 */
 	if (!strcmp(spec, "ping.data")) {
 		CHECK_LAST_FRAME(PING);
@@ -923,7 +923,7 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
 	}
 	/* SECTION: stream.spec.zexpect.winup WINDOW_UPDATE specific
 	 * winup.size
-	 *         The size of the upgrade given by the WINDOW_UPDATE frame.
+	 *	The size of the upgrade given by the WINDOW_UPDATE frame.
 	 */
 	else if (!strcmp(spec, "winup.size")) {
 		CHECK_LAST_FRAME(WINDOW_UPDATE);
@@ -931,13 +931,13 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
 	}
 	/* SECTION: stream.spec.zexpect.prio PRIORITY specific
 	 * prio.stream
-	 *         The stream ID announced.
+	 *	The stream ID announced.
 	 *
 	 * prio.exclusive
-	 *         "true" if the priority is exclusive, else "false".
+	 *	"true" if the priority is exclusive, else "false".
 	 *
 	 * prio.weight
-	 *         The dependency weight.
+	 *	The dependency weight.
 	 */
 	else if (!strcmp(spec, "prio.stream")) {
 		CHECK_LAST_FRAME(PRIORITY);
@@ -954,7 +954,7 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
 	}
 	/* SECTION: stream.spec.zexpect.rst RESET_STREAM specific
 	 * rst.err
-	 *         The error code (as integer) of the RESET_STREAM frame.
+	 *	The error code (as integer) of the RESET_STREAM frame.
 	 */
 	else if (!strcmp(spec, "rst.err")) {
 		CHECK_LAST_FRAME(RST_STREAM);
@@ -963,26 +963,26 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
 	/* SECTION: stream.spec.zexpect.settings SETTINGS specific
 	 *
 	 * settings.ack
-	 *         "true" if the ACK flag was set, else ""false.
+	 *	"true" if the ACK flag was set, else ""false.
 	 *
 	 * settings.push
-	 *         "true" if the push settings was set to yes, "false" if set to
-	 *         no, and <undef> if not present.
+	 *	"true" if the push settings was set to yes, "false" if set to
+	 *	no, and <undef> if not present.
 	 *
 	 * settings.hdrtbl
-	 *         Value of HEADER_TABLE_SIZE if set, <undef> otherwise.
+	 *	Value of HEADER_TABLE_SIZE if set, <undef> otherwise.
 	 *
 	 * settings.maxstreams
-	 *         Value of MAX_CONCURRENT_STREAMS if set, <undef> otherwise.
+	 *	Value of MAX_CONCURRENT_STREAMS if set, <undef> otherwise.
 	 *
 	 * settings.winsize
-	 *         Value of INITIAL_WINDOW_SIZE if set, <undef> otherwise.
+	 *	Value of INITIAL_WINDOW_SIZE if set, <undef> otherwise.
 	 *
 	 * setting.framesize
-	 *         Value of MAX_FRAME_SIZE if set, <undef> otherwise.
+	 *	Value of MAX_FRAME_SIZE if set, <undef> otherwise.
 	 *
 	 * settings.hdrsize
-	 *         Value of MAX_HEADER_LIST_SIZE if set, <undef> otherwise.
+	 *	Value of MAX_HEADER_LIST_SIZE if set, <undef> otherwise.
 	 */
 	else if (!strncmp(spec, "settings.", 9)) {
 		CHECK_LAST_FRAME(SETTINGS);
@@ -1008,7 +1008,7 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
 	}
 	/* SECTION: stream.spec.zexpect.push PUSH_PROMISE specific
 	 * push.id
-	 *         The id of the promised stream.
+	 *	The id of the promised stream.
 	 */
 	else if (!strcmp(spec, "push.id")) {
 		CHECK_LAST_FRAME(PUSH_PROMISE);
@@ -1016,13 +1016,13 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
 	}
 	/* SECTION: stream.spec.zexpect.goaway GOAWAY specific
 	 * goaway.err
-	 *         The error code (as integer) of the GOAWAY frame.
+	 *	The error code (as integer) of the GOAWAY frame.
 	 *
 	 * goaway.laststream
-	 *         Last-Stream-ID
+	 *	Last-Stream-ID
 	 *
 	 * goaway.debug
-	 *         Debug data, if any.
+	 *	Debug data, if any.
 	 */
 	else if (!strncmp(spec, "goaway.", 7)) {
 		spec += 7;
@@ -1040,20 +1040,20 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
 	}
 	/* SECTION: stream.spec.zexpect.zframe Generic frame
 	 * frame.data
-	 *         Payload of the last frame
+	 *	Payload of the last frame
 	 *
 	 * frame.type
-	 *         Type of the frame, as integer.
+	 *	Type of the frame, as integer.
 	 *
 	 * frame.size
-	 *         Size of the frame.
+	 *	Size of the frame.
 	 *
 	 * frame.stream
-	 *         Stream of the frame (correspond to the one you are executing
-	 *         this from, obviously).
+	 *	Stream of the frame (correspond to the one you are executing
+	 *	this from, obviously).
 	 *
 	 * frame.padding (for DATA, HEADERS, PUSH_PROMISE frames)
-	 *         Number of padded bytes.
+	 *	Number of padded bytes.
 	 */
 	else if (!strncmp(spec, "frame.", 6)) {
 		spec += 6;
@@ -1075,17 +1075,18 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
 	}
 	/* SECTION: stream.spec.zexpect.zstream Stream
 	 * stream.window
-	 *         The current window size of the stream, or, if on stream 0,
-	 *         of the connection.
+	 *	The current window size of the stream, or, if on stream 0,
+	 *	of the connection.
 	 *
 	 * stream.weight
-	 *         Weight of the stream
+	 *	Weight of the stream
 	 *
 	 * stream.dependency
-	 *         Id of the stream this one depends on.
+	 *	Id of the stream this one depends on.
 	 */
 	else if (!strcmp(spec, "stream.window")) {
-		snprintf(buf, 20, "%" PRIu64 "d", s->id ? s->ws : s->hp->ws);
+		snprintf(buf, 20, "%jd",
+		    (intmax_t)(s->id ? s->ws : s->hp->ws));
 		return (buf);
 	}
 	else if (!strcmp(spec, "stream.weight")) {
@@ -1106,21 +1107,21 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
 	}
 	/* SECTION: stream.spec.zexpect.ztable Index tables
 	 * tbl.dec.size / tbl.enc.size
-	 *         Size (bytes) of the decoding/encoding table.
+	 *	Size (bytes) of the decoding/encoding table.
 	 *
 	 * tbl.dec.size / tbl.enc.maxsize
-	 *         Maximum size (bytes) of the decoding/encoding table.
+	 *	Maximum size (bytes) of the decoding/encoding table.
 	 *
 	 * tbl.dec.length / tbl.enc.length
-	 *         Number of headers in decoding/encoding table.
+	 *	Number of headers in decoding/encoding table.
 	 *
 	 * tbl.dec[INT].key / tbl.enc[INT].key
-	 *         Name of the header at index INT of the decoding/encoding
-	 *         table.
+	 *	Name of the header at index INT of the decoding/encoding
+	 *	table.
 	 *
 	 * tbl.dec[INT].value / tbl.enc[INT].value
-	 *         Value of the header at index INT of the decoding/encoding
-	 *         table.
+	 *	Value of the header at index INT of the decoding/encoding
+	 *	table.
 	 */
 	else if (!strncmp(spec, "tbl.dec", 7) ||
 			!strncmp(spec, "tbl.enc", 7)) {
@@ -1156,28 +1157,28 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
 	 * still being construct (in-between two frames for example).
 	 *
 	 * req.bodylen / resp.bodylen
-	 *         Length in bytes of the request/response so far.
+	 *	Length in bytes of the request/response so far.
 	 *
 	 * req.body / resp.body
-	 *         Body of the request/response so far.
+	 *	Body of the request/response so far.
 	 *
 	 * req.http.STRING / resp.http.STRING
-	 *         Value of the header STRING in the request/response.
+	 *	Value of the header STRING in the request/response.
 	 *
 	 * req.status / resp.status
-	 *         :status pseudo-header's value.
+	 *	:status pseudo-header's value.
 	 *
 	 * req.url / resp.url
-	 *         :path pseudo-header's value.
+	 *	:path pseudo-header's value.
 	 *
 	 * req.method / resp.method
-	 *         :method pseudo-header's value.
+	 *	:method pseudo-header's value.
 	 *
 	 * req.authority / resp.authority
-	 *         :method pseudo-header's value.
+	 *	:method pseudo-header's value.
 	 *
 	 * req.scheme / resp.scheme
-	 *         :method pseudo-header's value.
+	 *	:method pseudo-header's value.
 	 */
 	else if (!strncmp(spec, "req.", 4) || !strncmp(spec, "resp.", 5)) {
 		if (spec[2] == 'q') {
@@ -1217,7 +1218,7 @@ cmd_var_resolve(const struct stream *s, const char *spec, char *buf)
  * describing the bytes, in hex notation, will possible whitespaces between
  * them. Here's an example::
  *
- *         sendhex "00 00 08 00 0900       8d"
+ *	sendhex "00 00 08 00 0900	8d"
  */
 static void
 cmd_sendhex(CMD_ARGS)
@@ -1298,80 +1299,80 @@ cmd_sendhex(CMD_ARGS)
  * each of them.
  *
  * \-noadd
- *         Do not add default headers. Useful to avoid duplicates when sending
- *         default headers using ``-hdr``, ``-idxHdr`` and ``-litIdxHdr``.
+ *	Do not add default headers. Useful to avoid duplicates when sending
+ *	default headers using ``-hdr``, ``-idxHdr`` and ``-litIdxHdr``.
  *
  * \-status INT (txresp)
- *         Set the :status pseudo-header.
+ *	Set the :status pseudo-header.
  *
  * \-url STRING (txreq, txpush)
- *         Set the :path pseudo-header.
+ *	Set the :path pseudo-header.
  *
  * \-req STRING (txreq, txpush)
- *         Set the :method pseudo-header.
+ *	Set the :method pseudo-header.
  *
  * \-scheme STRING (txreq, txpush)
- *         Set the :scheme pseudo-header.
+ *	Set the :scheme pseudo-header.
  *
  * \-hdr STRING1 STRING2
- *         Insert a header, STRING1 being the name, and STRING2 the value.
+ *	Insert a header, STRING1 being the name, and STRING2 the value.
  *
  * \-idxHdr INT
- *         Insert an indexed header, using INT as index.
+ *	Insert an indexed header, using INT as index.
  *
  * \-litIdxHdr inc|not|never INT huf|plain STRING
- *         Insert an literal, indexed header. The first argument specify if the
- *         header should be added to the table, shouldn't, or mustn't be
- *         compressed if/when retransmitted.
+ *	Insert an literal, indexed header. The first argument specify if the
+ *	header should be added to the table, shouldn't, or mustn't be
+ *	compressed if/when retransmitted.
  *
- *         INT is the idex of the header name to use.
+ *	INT is the idex of the header name to use.
  *
- *         The third argument informs about the Huffman encoding: yes (huf) or
- *         no (plain).
+ *	The third argument informs about the Huffman encoding: yes (huf) or
+ *	no (plain).
  *
- *         The last term is the literal value of the header.
+ *	The last term is the literal value of the header.
  *
  * \-litHdr inc|not|never huf|plain STRING1 huf|plain STRING2
- *         Insert a literal header, with the same first argument as
- *         ``-litIdxHdr``.
+ *	Insert a literal header, with the same first argument as
+ *	``-litIdxHdr``.
  *
- *         The second and third terms tell what the name of the header is and if
- *         it should be Huffman-encoded, while the last two do the same
- *         regarding the value.
+ *	The second and third terms tell what the name of the header is and if
+ *	it should be Huffman-encoded, while the last two do the same
+ *	regarding the value.
  *
  * \-body STRING (txreq, txresp)
- *         Specify a body, effectively putting STRING into a DATA frame after
- *         the HEADER frame is sent.
+ *	Specify a body, effectively putting STRING into a DATA frame after
+ *	the HEADER frame is sent.
  *
  * \-bodylen INT (txreq, txresp)
- *         Do the same thing as ``-body`` but generate an string of INT length
- *         for you.
+ *	Do the same thing as ``-body`` but generate an string of INT length
+ *	for you.
  *
  * \-nostrend (txreq, txresp)
- *         Don't set the END_STREAM flag automatically, making the peer expect
- *         a body after the headers.
+ *	Don't set the END_STREAM flag automatically, making the peer expect
+ *	a body after the headers.
  *
  * \-nohdrend
- *         Don't set the END_HEADERS flag automatically, making the peer expect
- *         more HEADER frames.
+ *	Don't set the END_HEADERS flag automatically, making the peer expect
+ *	more HEADER frames.
  *
  * \-dep INT (txreq, txresp)
- *         Tell the peer that this content depends on the stream with the INT
- *         id.
+ *	Tell the peer that this content depends on the stream with the INT
+ *	id.
  *
  * \-ex (txreq, txresp)
- *         Make the dependency exclusive (``-dep`` is still needed).
+ *	Make the dependency exclusive (``-dep`` is still needed).
  *
  * \-weight (txreq, txresp)
- *         Set the weight for the dependency.
+ *	Set the weight for the dependency.
  *
  * \-promised INT (txpush)
- *         The id of the promised stream.
+ *	The id of the promised stream.
  *
  * \-pad STRING / -padlen INT (txreq, txresp, txpush)
- *         Add string as padding to the frame, either the one you provided with
- *         \-pad, or one that is generated for you, of length INT is -padlen
- *         case.
+ *	Add string as padding to the frame, either the one you provided with
+ *	\-pad, or one that is generated for you, of length INT is -padlen
+ *	case.
  */
 static void
 cmd_tx11obj(CMD_ARGS)
@@ -1567,7 +1568,7 @@ cmd_tx11obj(CMD_ARGS)
 		s->dependency = stid;
 
 		assert(f.size + 5 < BUF_SIZE);
-	        memmove(buf + 5, buf, f.size);
+		memmove(buf + 5, buf, f.size);
 		vbe32enc(buf, (stid | exclusive));
 		buf[4] = s->weight;
 		f.size += 5;
@@ -1591,7 +1592,7 @@ cmd_tx11obj(CMD_ARGS)
 	}
 	if (f.type == TYPE_PUSH_PROMISE)
 		f.size += 4;
-	f.data = buf;	
+	f.data = buf;
 	HPK_FreeIter(iter);
 	write_frame(s->hp, &f, 1);
 	free(buf);
@@ -1613,19 +1614,19 @@ cmd_tx11obj(CMD_ARGS)
  * and txdata automatically set it.
  *
  * \-data STRING
- *         Data to be embedded into the frame.
+ *	Data to be embedded into the frame.
  *
  * \-datalen INT
- *         Generate and INT-bytes long string to be sent in the frame.
+ *	Generate and INT-bytes long string to be sent in the frame.
  *
  * \-pad STRING / -padlen INT
- *         Add string as padding to the frame, either the one you provided with
- *         \-pad, or one that is generated for you, of length INT is -padlen
- *         case.
+ *	Add string as padding to the frame, either the one you provided with
+ *	\-pad, or one that is generated for you, of length INT is -padlen
+ *	case.
  *
  * \-nostrend
- *         Don't set the END_STREAM flag, allowing to send more data on this
- *         stream.
+ *	Don't set the END_STREAM flag, allowing to send more data on this
+ *	stream.
  */
 static void
 cmd_txdata(CMD_ARGS)
@@ -1699,9 +1700,9 @@ cmd_txdata(CMD_ARGS)
  * (NO_ERROR).
  *
  * \-err STRING|INT
- *         Sets the error code to be sent. The argument can be an integer or a
- *         string describing the error, such as NO_ERROR, or CANCEL (see
- *         rfc7540#11.4 for more strings).
+ *	Sets the error code to be sent. The argument can be an integer or a
+ *	string describing the error, such as NO_ERROR, or CANCEL (see
+ *	rfc7540#11.4 for more strings).
  */
 static void
 cmd_txrst(CMD_ARGS)
@@ -1728,7 +1729,7 @@ cmd_txrst(CMD_ARGS)
 
 			STRTOU32(err, *av, p, vl, "-err");
 		} else
-			break;	
+			break;
 	}
 	if (*av != NULL)
 		vtc_log(vl, 0, "Unknown txrst spec: %s\n", *av);
@@ -1743,15 +1744,15 @@ cmd_txrst(CMD_ARGS)
  * Send a PRIORITY frame
  *
  * \-stream INT
- *         indicate the id of the stream the sender stream depends on.
+ *	indicate the id of the stream the sender stream depends on.
  *
  * \-ex
- *         the dependency should be made exclusive (only this streams depends on
- *         the parent stream).
+ *	the dependency should be made exclusive (only this streams depends on
+ *	the parent stream).
  *
  * \-weight INT
- *         an 8-bits integer is used to balance priority between streams
- *         depending on the same streams. 
+ *	an 8-bits integer is used to balance priority between streams
+ *	depending on the same streams.
  */
 static void
 cmd_txprio(CMD_ARGS)
@@ -1778,7 +1779,7 @@ cmd_txprio(CMD_ARGS)
 		} else if (!strcmp(*av, "-weight")) {
 			STRTOU32_CHECK(weight, av, p, vl, "-weight", 8);
 		} else
-			break;	
+			break;
 	}
 	if (*av != NULL)
 		vtc_log(vl, 0, "Unknown txprio spec: %s\n", *av);
@@ -1809,25 +1810,25 @@ cmd_txprio(CMD_ARGS)
  * are from  rfc7540#6.5.2):
  *
  * \-hdrtbl INT
- *         headers table size
+ *	headers table size
  *
  * \-push BOOL
- *         whether push frames are accepted or not
+ *	whether push frames are accepted or not
  *
  * \-maxstreams INT
- *         maximum concurrent streams allowed
+ *	maximum concurrent streams allowed
  *
  * \-winsize INT
- *         sender's initial window size
+ *	sender's initial window size
  *
  * \-framesize INT
- *         largest frame size authorized
+ *	largest frame size authorized
  *
  * \-hdrsize INT
- *         maximum size of the header list authorized
+ *	maximum size of the header list authorized
  *
  * \-ack
- *         set the ack bit
+ *	set the ack bit
  */
 static void
 cmd_txsettings(CMD_ARGS)
@@ -1902,10 +1903,10 @@ cmd_txsettings(CMD_ARGS)
  * Send PING frame.
  *
  * \-data STRING
- *         specify the payload of the frame, with STRING being an 8-char string.
+ *	specify the payload of the frame, with STRING being an 8-char string.
  *
  * \-ack
- *         set the ACK flag.
+ *	set the ACK flag.
  */
 static void
 cmd_txping(CMD_ARGS)
@@ -1945,17 +1946,17 @@ cmd_txping(CMD_ARGS)
  * Possible options include:
  *
  * \-err STRING|INT
- *         set the error code to eplain the termination. The second argument
- *         can be a integer or the string version of the error code as found
- *         in rfc7540#7.
+ *	set the error code to eplain the termination. The second argument
+ *	can be a integer or the string version of the error code as found
+ *	in rfc7540#7.
  *
  * \-laststream INT
- *         the id of the "highest-numbered stream identifier for which the
- *         sender of the GOAWAY frame might have taken some action on or might
- *         yet take action on".
+ *	the id of the "highest-numbered stream identifier for which the
+ *	sender of the GOAWAY frame might have taken some action on or might
+ *	yet take action on".
  *
  * \-debug
- *         specify the debug data, if any to append to the frame.
+ *	specify the debug data, if any to append to the frame.
  */
 static void
 cmd_txgoaway(CMD_ARGS)
@@ -2014,7 +2015,7 @@ cmd_txgoaway(CMD_ARGS)
  * connection (from stream 0) or of the stream (any other stream).
  *
  * \-size INT
- *         give INT credits to the peer.
+ *	give INT credits to the peer.
  */
 static void
 cmd_txwinup(CMD_ARGS)
@@ -2024,7 +2025,7 @@ cmd_txwinup(CMD_ARGS)
 	char *p;
 	struct frame f;
 	char buf[8];
-	uint32_t size = 0; 
+	uint32_t size = 0;
 
 	(void)cmd;
 	CAST_OBJ_NOTNULL(s, priv, STREAM_MAGIC);
@@ -2041,7 +2042,7 @@ cmd_txwinup(CMD_ARGS)
 		if (!strcmp(*av, "-size")) {
 			STRTOU32_CHECK(size, av, p, vl, "-size", 0);
 		} else
-			break;	
+			break;
 	}
 	if (*av != NULL)
 		vtc_log(vl, 0, "Unknown txwinup spec: %s\n", *av);
@@ -2089,7 +2090,7 @@ rxstuff(struct stream *s) {
 				"instead of %s (%d)", \
 				rcv, func, \
 				rt < TYPE_MAX ? h2_types[rt] : "?", rt, \
-			       	wt < TYPE_MAX ? h2_types[wt] : "?", wt); \
+				wt < TYPE_MAX ? h2_types[wt] : "?", wt); \
 	} while (0);
 
 /* SECTION: stream.spec.data_12 rxhdrs
@@ -2098,10 +2099,10 @@ rxstuff(struct stream *s) {
  * zero or more CONTINUATION frame.
  *
  * \-all
- *         Keep waiting for CONTINUATION frames until END_HEADERS flag is seen.
+ *	Keep waiting for CONTINUATION frames until END_HEADERS flag is seen.
  *
  * \-some INT
- *         Retrieve INT - 1 CONTINUATION frames after the HEADER frame.
+ *	Retrieve INT - 1 CONTINUATION frames after the HEADER frame.
  *
  */
 static void
@@ -2125,7 +2126,7 @@ cmd_rxhdrs(CMD_ARGS)
 		} else if (!strcmp(*av, "-all")) {
 			loop = 1;
 		} else
-			break;	
+			break;
 	}
 	if (*av != NULL)
 		vtc_log(vl, 0, "Unknown rxhdrs spec: %s\n", *av);
@@ -2160,7 +2161,7 @@ cmd_rxcont(CMD_ARGS)
 		} else if (!strcmp(*av, "-all")) {
 			loop = 1;
 		} else
-			break;	
+			break;
 	}
 	if (*av != NULL)
 		vtc_log(vl, 0, "Unknown rxcont spec: %s\n", *av);
@@ -2182,10 +2183,10 @@ cmd_rxcont(CMD_ARGS)
  * arguments:
  *
  * \-all
- *         keep waiting for DATA frame until one sets the END_STREAM flag
+ *	keep waiting for DATA frame until one sets the END_STREAM flag
  *
  * \-some INT
- *         retrieve INT DATA frames.
+ *	retrieve INT DATA frames.
  *
  */
 static void
@@ -2208,7 +2209,7 @@ cmd_rxdata(CMD_ARGS)
 		} else if (!strcmp(*av, "-all")) {
 			loop = 1;
 		} else
-			break;	
+			break;
 	}
 	if (*av != NULL)
 		vtc_log(vl, 0, "Unknown rxdata spec: %s\n", *av);
@@ -2276,10 +2277,10 @@ cmd_rxreqsp(CMD_ARGS)
  * CONTINUATION frames.
  *
  * \-all
- *         Keep waiting for CONTINUATION frames until END_HEADERS flag is seen.
+ *	Keep waiting for CONTINUATION frames until END_HEADERS flag is seen.
  *
  * \-some INT
- *         Retrieve INT - 1 CONTINUATION frames after the PUSH frame.
+ *	Retrieve INT - 1 CONTINUATION frames after the PUSH frame.
  *
  */
 static void
@@ -2618,7 +2619,7 @@ stream_run(struct stream *s)
  *
  * Stream syntax follow the client/server one::
  *
- *         stream ID [SPEC] [ACTION]
+ *	stream ID [SPEC] [ACTION]
  *
  * ID is the H/2 stream number, while SPEC describes what will be done in that
  * stream.
@@ -2626,27 +2627,27 @@ stream_run(struct stream *s)
  * Note that, when parsing a stream action, if the entity isn't operating in H/2
  * mode, these spec is ran before::
  *
- *         txpri/rxpri # client/server
- *         stream 0 {
- *             txsettings
- *             rxsettings
- *             txsettings -ack
- *             rxsettings
- *             expect settings.ack == true
- *         } -run
+ *	txpri/rxpri # client/server
+ *	stream 0 {
+ *	    txsettings
+ *	    rxsettings
+ *	    txsettings -ack
+ *	    rxsettings
+ *	    expect settings.ack == true
+ *	} -run
  *
  * And H/2 mode is then activated before parsing the specification.
  *
  * SECTION: stream.actions Actions
  *
  * \-start
- *         Run the specification in a thread, giving back control immediately.
+ *	Run the specification in a thread, giving back control immediately.
  *
  * \-wait
- *         Wait for the started thread to finish running the spec.
+ *	Wait for the started thread to finish running the spec.
  *
  * \-run
- *         equivalent to calling ``-start`` then ``-wait``. 
+ *	equivalent to calling ``-start`` then ``-wait``.
  */
 
 void
@@ -2722,7 +2723,7 @@ b64_settings(const struct http *hp, const char *s)
 			s++;
 		}
 		i = v >> 32;
-		v &= 0xffff;		
+		v &= 0xffff;
 
 		if (i <= SETTINGS_MAX) {
 			buf = h2_settings[i];
@@ -2736,7 +2737,8 @@ b64_settings(const struct http *hp, const char *s)
 				HPK_ResizeTbl(hp->decctx, v);
 		}
 
-		vtc_log(hp->vl, 4, "Upgrade: %s (%d): %" PRIu64 "d", buf, i, v);
+		vtc_log(hp->vl, 4, "Upgrade: %s (%d): %ju",
+		    buf, i, (intmax_t)v);
 	}
 }
 



More information about the varnish-commit mailing list