static enum req_fsm_nxt cnt_pipe(struct worker *wrk, struct req *req) { struct busyobj *bo; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC); AN(req->vcl); wrk->stats->s_pipe++; bo = VBO_GetBusyObj(wrk, req); CHECK_OBJ_NOTNULL(bo, BUSYOBJ_MAGIC); VSLb(bo->vsl, SLT_Begin, "bereq %u pipe", VXID(req->vsl->wid)); VSLb(req->vsl, SLT_Link, "bereq %u pipe", VXID(bo->vsl->wid)); THR_SetBusyobj(bo); HTTP_Setup(bo->bereq, bo->ws, bo->vsl, SLT_BereqMethod); http_FilterReq(bo->bereq, req->http, 0); // XXX: 0 ? http_PrintfHeader(bo->bereq, "X-Varnish: %u", VXID(req->vsl->wid)); http_SetHeader(bo->bereq, "Connection: close"); VCL_pipe_method(req->vcl, wrk, req, bo, NULL); if (wrk->handling == VCL_RET_SYNTH) INCOMPL(); assert(wrk->handling == VCL_RET_PIPE); SES_Close(req->sp, VDI_Http1Pipe(req, bo)); http_Teardown(bo->bereq); VBO_ReleaseBusyObj(wrk, &bo); THR_SetBusyobj(NULL); return (REQ_FSM_DONE); }
static int cnt_pipe(struct worker *wrk, struct req *req) { struct busyobj *bo; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CHECK_OBJ_NOTNULL(req->vcl, VCL_CONF_MAGIC); AZ(req->busyobj); req->acct_req.pipe++; req->busyobj = VBO_GetBusyObj(wrk, req); bo = req->busyobj; HTTP_Setup(bo->bereq, bo->ws, bo->vsl, HTTP_Bereq); http_FilterReq(req, 0); VCL_pipe_method(req); if (req->handling == VCL_RET_ERROR) INCOMPL(); assert(req->handling == VCL_RET_PIPE); PipeRequest(req); assert(WRW_IsReleased(wrk)); http_Teardown(bo->bereq); VBO_DerefBusyObj(wrk, &req->busyobj); return (1); }
static enum req_fsm_nxt cnt_pipe(struct worker *wrk, struct req *req) { struct busyobj *bo; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(req, REQ_MAGIC); CHECK_OBJ_NOTNULL(req->vcl, VCL_CONF_MAGIC); req->acct_req.pipe++; bo = VBO_GetBusyObj(wrk, req); HTTP_Setup(bo->bereq, bo->ws, bo->vsl, HTTP_Bereq); http_FilterReq(bo->bereq, req->http, 0); // XXX: 0 ? http_PrintfHeader(bo->bereq, "X-Varnish: %u", req->vsl->wid & VSL_IDENTMASK); VCL_pipe_method(req->vcl, wrk, req, bo, req->http->ws); if (wrk->handling == VCL_RET_ERROR) INCOMPL(); assert(wrk->handling == VCL_RET_PIPE); PipeRequest(req, bo); assert(WRW_IsReleased(wrk)); http_Teardown(bo->bereq); VBO_DerefBusyObj(wrk, &bo); return (REQ_FSM_DONE); }
static int cnt_pipe(struct sess *sp) { CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC); sp->acct_req.pipe++; WS_Reset(sp->wrk->ws, NULL); sp->wrk->bereq = &sp->wrk->http[0]; http_Setup(sp->wrk->bereq, sp->wrk->ws); http_FilterHeader(sp, HTTPH_R_PIPE); VCL_pipe_method(sp); if (sp->handling == VCL_RET_ERROR) INCOMPL(); assert(sp->handling == VCL_RET_PIPE); PipeSession(sp); AZ(sp->wrk->wfd); sp->wrk->bereq = NULL; sp->step = STP_DONE; return (0); }
static int cnt_pipe(struct sess *sp) { struct worker *wrk; CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); wrk = sp->wrk; CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(sp->vcl, VCL_CONF_MAGIC); AZ(wrk->busyobj); wrk->acct_tmp.pipe++; wrk->busyobj = VBO_GetBusyObj(wrk); WS_Reset(wrk->ws, NULL); wrk->busyobj = VBO_GetBusyObj(wrk); http_Setup(wrk->busyobj->bereq, wrk->ws); http_FilterHeader(sp, HTTPH_R_PIPE); VCL_pipe_method(sp); if (sp->handling == VCL_RET_ERROR) INCOMPL(); assert(sp->handling == VCL_RET_PIPE); PipeSession(sp); assert(WRW_IsReleased(wrk)); http_Setup(wrk->busyobj->bereq, NULL); VBO_DerefBusyObj(wrk, &wrk->busyobj); sp->step = STP_DONE; return (0); }