Commit 8ae27a9c authored by Lasse Karstensen's avatar Lasse Karstensen

Add Begin and Link VSL records for piped requests.

This allows varnishlog and the other tools to group it automatically
with the client request.
parent 0b1fa10a
......@@ -593,6 +593,7 @@ cnt_pipe(struct worker *wrk, struct req *req)
wrk->stats.s_pipe++;
bo = VBO_GetBusyObj(wrk, req);
HTTP_Setup(bo->bereq, bo->ws, bo->vsl, SLT_BereqMethod);
VSLb(bo->vsl, SLT_Begin, "bereq %u pipe", req->vsl->wid & VSL_IDENTMASK);
http_FilterReq(bo->bereq, req->http, 0); // XXX: 0 ?
http_PrintfHeader(bo->bereq,
"X-Varnish: %u", req->vsl->wid & VSL_IDENTMASK);
......@@ -604,6 +605,7 @@ cnt_pipe(struct worker *wrk, struct req *req)
INCOMPL();
assert(wrk->handling == VCL_RET_PIPE);
VSLb(req->vsl, SLT_Link, "bereq %u pipe", bo->vsl->wid & VSL_IDENTMASK);
PipeRequest(req, bo);
assert(WRW_IsReleased(wrk));
http_Teardown(bo->bereq);
......
......@@ -103,6 +103,7 @@ enum VSL_reason_e {
VSL_r_pass,
VSL_r_fetch,
VSL_r_bgfetch,
VSL_r_pipe,
VSL_r__MAX,
};
......
......@@ -65,6 +65,7 @@ static const char * const vsl_r_names[VSL_r__MAX] = {
[VSL_r_pass] = "pass",
[VSL_r_fetch] = "fetch",
[VSL_r_bgfetch] = "bgfetch",
[VSL_r_pipe] = "pipe",
};
struct vtx;
......
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