Skip to content

Commit df7d3ac

Browse files
committed
H2: Log H2 upgrade to the session vsl instead of the 0 vxid
For PU upgrade, at the time of this log, the req->vsl is not assigned a vxid yet, and thus the line would be logged for vxid 0, which doen't make much sense. In all cases, it is better to log it on the sess vsl instead. Noticed while reading a vtc output.
1 parent 93f806b commit df7d3ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

bin/varnishd/http2/cache_http2_session.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,15 +350,15 @@ h2_ou_session(struct worker *wrk, struct h2_sess *h2,
350350
void
351351
H2_PU_Sess(struct worker *wrk, struct sess *sp, struct req *req)
352352
{
353-
VSLb(req->vsl, SLT_Debug, "H2 Prior Knowledge Upgrade");
353+
VSL(SLT_Debug, sp->vxid, "H2 Prior Knowledge Upgrade");
354354
req->err_code = H2_PU_MARKER;
355355
SES_SetTransport(wrk, sp, req, &HTTP2_transport);
356356
}
357357

358358
void
359359
H2_OU_Sess(struct worker *wrk, struct sess *sp, struct req *req)
360360
{
361-
VSLb(req->vsl, SLT_Debug, "H2 Optimistic Upgrade");
361+
VSL(SLT_Debug, sp->vxid, "H2 Optimistic Upgrade");
362362
req->err_code = H2_OU_MARKER;
363363
SES_SetTransport(wrk, sp, req, &HTTP2_transport);
364364
}

0 commit comments

Comments
 (0)