Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

propertyTsmCustomHTTPSClient.Protocols

property Protocols: tHttpClientProtocols read fProtocols write SetProtocols default [hcpHttp11, hcpHttp2];
WHICH application protocols to offer in the TLS ALPN extension - not which to prefer. This is a SET: a set has no order, so the members are present or absent and nothing here expresses a ranking. THE SERVER CHOOSES, AND ITS PREFERENCE WINS. RFC 7301 leaves selection to the server, and this library's own server side does precisely that: PickProtocol walks the SERVER's registered protocols and takes the first one the client also offered, so the order the client sends is never consulted. Measured, not assumed - registering TsmHTTPSv1dot1 before TsmHTTPSv2 on the server makes every client get http/1.1 however it asks. So offering both means "either is acceptable to me", never "h2 please". A server that selects nothing - including one that ignores ALPN entirely - yields HTTP/1.1, which is what Wire falls back to. The EMPTY SET offers no ALPN extension at all, which is not the same as offering only http/1.1, and is what a peer that mishandles the extension needs. Add hcpHttp3 to let the client move to HTTP/3. It learns an h3 alternative from the Alt-Svc field of a response on an authenticated connection; a later request then tries QUIC first, once no other exchange is in flight and every earlier response body has been read to its end, and falls back to TCP when QUIC does not connect within Http3AttemptTimeout. TCP is needed both to learn the alternative and to fall back to, so [hcpHttp3] alone is refused. Change Protocols only while disconnected; it raises otherwise.