Make ALPN configuration easier for use with TlsHandshakeCallbackOptions #31303
Labels
area-networking
Includes servers, yarp, json patch, bedrock, websockets, http client factory, and http abstractions
feature-kestrel
Needs: Design
This issue requires design work before implementating.
Milestone
Thanks @nitinag for reporting this issue in #25390 (comment).
I think having a public static
ConfigureAlpn
method like @nitinag suggests is a reasonable approach. It's internal rather than private today so SniOptionsSelector can call it which probably should have been a sign it should be made public in the first place.My only concern is that people still won't know to call it and therefore unintentionally disable HTTP/2 when trying to write custom SNI logic. API docs can help here, but not everyone reads it.
I wonder if instead we should automatically populate
ApplicationProtocols
if its null. The question there becomes what if I want to disable ALPN? Is that important? Could that be done with an empty list instead of a null list?We shouldn't let perfect be the enemy of the good though. If we cannot autopupulate the ALPN list for whatever reason, we should just expose
ConfigureAlpn
. It shouldn't be necessary for people to copy/paste this code.The text was updated successfully, but these errors were encountered: