Skip to content

Commit 440319d

Browse files
committed
http2: clear an in-progress request when deleting it
otherwise, for the modified vtc, a continuation is still expected when another stream is opened: 1031 SessError c H2: expected continuation but received HEADERS on stream 3 1031 Debug c H2 CLEANUP H2CE_PROTOCOL_ERROR Partly addresses #4283
1 parent d4b5767 commit 440319d

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

bin/varnishd/http2/cache_http2_proto.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -192,6 +192,8 @@ h2_del_req(struct worker *wrk, struct h2_req *r2)
192192
--h2->refcnt;
193193
/* XXX: PRIORITY reshuffle */
194194
VTAILQ_REMOVE(&h2->streams, r2, list);
195+
if (r2->req == h2->new_req)
196+
h2->new_req = NULL;
195197
Lck_Unlock(&sp->mtx);
196198

197199
assert(!WS_IsReserved(r2->req->ws));

bin/varnishtest/tests/t02023.vtc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,8 @@ client c1 {
130130
rxrst
131131
expect rst.err == PROTOCOL_ERROR
132132
} -run
133+
stream 3 {
134+
txreq
135+
rxresp
136+
} -run
133137
} -run

0 commit comments

Comments
 (0)