Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-66745

Winstone: http/2 port not backward compatible with pre-ALPN http/1.1 clients

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • winstone-jetty
    • None
    • Jenkins 2.289.3 LTS running on java 11.0.12 2021-07-20 LTS

      According to the docs, Jenkins 2.289.3 LTS supports listening on http/2 (when running on Winstone)

      http/2 connections technically work, but the http2 port is not backward compatible with pre-ALPN http/1.1 clients.  so it supports ONLY http/2 connections (primarily browsers) and not other older tool version use-cases.

      So while my browser works great at hitting Jenkins using http/2, I cannot use my pre-ALPN curl version (on my RHEL7.9 box) or wget, to download any artifacts from my Jenkins http/2 port.   When I try to download an artifact, I end up with a 32-byte file with the text 'invalid_preface' rather than the artifact.   Surprisingly, there is no error reported by curl.  Scenario testing in curl on a RHEL8.4 box (this version of curl supports ALPN) confirms the issue.

      This is very limiting, as one needs to open both a http/2 port (for browsers) and http/1.1 port (for curl/wget and other scripting tools that may not support ALPN/http2 yet).   That's the scenario we find ourselves in at the moment.

      As far as I can tell, most J2EE runtime environments support http/2 with automatic fallback to http/1.1 when a non-ALPN aware client (like an old curl version) connects.    That way, a server only needs to expose a single port, and it works for both new and old client http versions.

      Unfortunately, Jenkins 2.289.3 LTS does not support pre-ALPN clients accessing the http2 port.

      I'm not sure where this limitation lies – in Jenkins' configuration of Winstone, or in Winstone itself.   I do know that Jetty itself supports this feature.  (tested in Jetty 10, just using standard jetty modules)

            Unassigned Unassigned
            srothco Steve Roth
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: