vtest "2387: Crash on out of order header blocks"

server s1 {
	rxreq
	txresp
} -start

vinyl v1 -vcl+backend {} -start

vinyl v1 -cliok "param.set feature +http2"
vinyl v1 -cliok "param.set debug +syncvsl"


barrier b1 cond 3
barrier b2 cond 3

client c1 {
	stream 1 {
		txreq -nohdrend
		barrier b2 sync
		barrier b1 sync
		txcont -hdr "bar" "foo"
	} -start
	stream 3 {
		barrier b2 sync
		txreq -nohdrend
		barrier b1 sync
		txcont -hdr "bar" "foo"

	} -start

	barrier b2 sync
	non_fatal
	barrier b1 sync

	stream 1 -wait
	stream 3 -wait
	fatal

	stream 0 {
		rxgoaway
		expect goaway.laststream == "1"
		expect goaway.err == PROTOCOL_ERROR
	} -run
} -run
