[
https://issues.apache.org/jira/browse/TS-3476?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14570004#comment-14570004
]
Eric Schwartz commented on TS-3476:
-----------------------------------
Looking at the SSLNetVConnection it looks like we can get the ALPN/NPN
negotiated protocol from the connection there pretty easily (right now it's
stored temporarily and logged to traffic.out. I don't see a reason we couldn't
just make this a field in the SSLNetVC class and then grab that from the NetVC
in HttpSM for logging. This works out nicely because even though for h2 and
SPDY, the HttpSM doesn't have a flag with the protocol version, the SSLNetVC
does.
That gets us the SSL case. We wouldn't be able to log the protocol from a
UnixNetVC in this way though. Is that a problem/something we can come up with
another solution for?
Alternatively, for both SSL and non-SSL cases, we can get the negotiated
protocol on the client from the "uppermost" ClientSession. This involves
introducing some sort of pointer from the underlying HttpClientSession in our
SPDY implementation back to its "parent" session. I've been playing around with
doing this for a while though and it gets very hairy, because it's difficult to
get a pointer back to the SpdyClientSession from the HttpClientSession in any
sort of fashion in time for the HttpSM to grab the protocol from its ua_session
in time for logging.
In addition to these two approaches, does anyone have any alternative ideas how
we might do this?
> Add a log tag for APLN/NPN negotiated protocol
> ----------------------------------------------
>
> Key: TS-3476
> URL: https://issues.apache.org/jira/browse/TS-3476
> Project: Traffic Server
> Issue Type: New Feature
> Components: Logging, SSL
> Reporter: Leif Hedstrom
> Assignee: Eric Schwartz
> Fix For: 6.0.0
>
>
> It seems crucial to be able to log which protocol handler was negotiated with
> ALPN (and perhaps NPN as long as we support it). This could simple be the
> string that was negotiated by the client/server in the TLS handshake. For
> example, with HTTP/2, it would be "h2" (or "h2-14" with some browsers).
> A suggested log tag name would be %<alpn> which seems clear enough to me and
> easy to remember :).
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)