Skip to content

Commit

Permalink
H2: Log H2 upgrade to the session vsl instead of the 0 vxid
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
walid-git committed Jan 2, 2025
1 parent 93f806b commit df7d3ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/varnishd/http2/cache_http2_session.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,15 +350,15 @@ h2_ou_session(struct worker *wrk, struct h2_sess *h2,
void
H2_PU_Sess(struct worker *wrk, struct sess *sp, struct req *req)
{
VSLb(req->vsl, SLT_Debug, "H2 Prior Knowledge Upgrade");
VSL(SLT_Debug, sp->vxid, "H2 Prior Knowledge Upgrade");
req->err_code = H2_PU_MARKER;
SES_SetTransport(wrk, sp, req, &HTTP2_transport);
}

void
H2_OU_Sess(struct worker *wrk, struct sess *sp, struct req *req)
{
VSLb(req->vsl, SLT_Debug, "H2 Optimistic Upgrade");
VSL(SLT_Debug, sp->vxid, "H2 Optimistic Upgrade");
req->err_code = H2_OU_MARKER;
SES_SetTransport(wrk, sp, req, &HTTP2_transport);
}
Expand Down

0 comments on commit df7d3ac

Please sign in to comment.