HttpClient: SSLParameters with no protocols configured disable HTTP2+ support

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 11, 26
    • Component/s: core-libs

      As the summary says.

      Example:
              HttpClient client = HttpClient.newBuilder()
                      .sslContext(sslContext)
                      .sslParameters(new SSLParameters())
                      .build();

      The above HttpClient will not use Http2 or Http3. That's because the tests in HttpConnection#hasRequiredHTTP2TLSVersion and HttpQuicConnection#hasRequiredHTTP3TLSVersion return false when no protocols are configured.

      Workaround: when setting SSLParameters, start with SSLContext.getDefaultSSLParameters(), instead of starting from newly constructed SSLParameters.

      Originally reported by Christoph Läubrich.

            Assignee:
            Daniel Jelinski
            Reporter:
            Daniel Jelinski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: