From 032ddf16ff9c1fd1c5c586cd1b82312338caea00 Mon Sep 17 00:00:00 2001 From: Nils Goroll Date: Tue, 5 Nov 2024 19:14:26 +0100 Subject: [PATCH] http1: Do not reset the transport pointer This allows code-reuse from custom implementations where only the deliver deliver callback differs. --- bin/varnishd/http1/cache_http1_fsm.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/bin/varnishd/http1/cache_http1_fsm.c b/bin/varnishd/http1/cache_http1_fsm.c index ed60f5d5ba..1d9efb1aa1 100644 --- a/bin/varnishd/http1/cache_http1_fsm.c +++ b/bin/varnishd/http1/cache_http1_fsm.c @@ -82,7 +82,6 @@ http1_req(struct worker *wrk, void *arg) CAST_OBJ_NOTNULL(req, arg, REQ_MAGIC); THR_SetRequest(req); - req->transport = &HTTP1_transport; assert(!WS_IsReserved(wrk->aws)); HTTP1_Session(wrk, req); AZ(wrk->v1l); @@ -309,8 +308,7 @@ HTTP1_Session(struct worker *wrk, struct req *req) */ if (http1_getstate(sp) == H1NEWREQ) VTCP_blocking(sp->fd); - - req->transport = &HTTP1_transport; + req->transport = XPORT_ByNumber(sp->sattr[SA_TRANSPORT]); while (1) { st = http1_getstate(sp);