Commit a575331d authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Ignore DATA received after stream closed

Fixes #2304
parent cd54c184
......@@ -636,8 +636,9 @@ h2_rx_data(struct worker *wrk, struct h2_sess *h2, struct h2_req *r2)
unsigned wi;
(void)wrk;
AN(r2);
ASSERT_RXTHR(h2);
if (r2 == NULL)
return (0);
Lck_Lock(&h2->sess->mtx);
AZ(h2->mailcall);
h2->mailcall = r2;
......
......@@ -417,3 +417,35 @@ varnish v1 -expect MEMPOOL.req1.live == 0
varnish v1 -expect MEMPOOL.sess0.live == 0
varnish v1 -expect MEMPOOL.sess1.live == 0
#######################################################################
# Test DATA error conditions
client c1 {
stream 1 {
txdata -data "FOOBAR"
} -run
stream 0 {
rxgoaway
} -run
expect_close
} -run
client c1 {
stream 1 {
txreq
rxresp
txdata -data "FOOBAR"
} -run
stream 3 {
txreq
rxresp
} -run
} -run
varnish v1 -vsl_catchup
varnish v1 -expect MEMPOOL.req0.live == 0
varnish v1 -expect MEMPOOL.req1.live == 0
varnish v1 -expect MEMPOOL.sess0.live == 0
varnish v1 -expect MEMPOOL.sess1.live == 0
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