diff --git a/bin/varnishd/http2/cache_http2_deliver.c b/bin/varnishd/http2/cache_http2_deliver.c index 267ea91ea95..cdd356d7dc6 100644 --- a/bin/varnishd/http2/cache_http2_deliver.c +++ b/bin/varnishd/http2/cache_http2_deliver.c @@ -75,12 +75,14 @@ V2D_Init(void) static int v_matchproto_(vdp_init_f) h2_init(VRT_CTX, struct vdp_ctx *vdc, void **priv, struct objcore *oc) { + struct h2_req *r2; CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC); CHECK_OBJ_NOTNULL(vdc, VDP_CTX_MAGIC); + AN(priv); + CAST_OBJ_NOTNULL(r2, *priv, H2_REQ_MAGIC); + (void)r2; (void)oc; - CHECK_OBJ_NOTNULL(vdc->req, REQ_MAGIC); - *priv = vdc->req->transport_priv; return (0); } @@ -346,7 +348,7 @@ h2_deliver(struct req *req, struct boc *boc, int sendbody) if (sendbody) { INIT_OBJ(ctx, VRT_CTX_MAGIC); VCL_Req2Ctx(ctx, req); - if (!VDP_Push(ctx, req->vdc, req->ws, &h2_vdp, NULL)) + if (!VDP_Push(ctx, req->vdc, req->ws, &h2_vdp, r2)) (void)VDP_DeliverObj(req->vdc, req->objcore); }