Skip to content

Netty client: HTTP2 transport mode sends cleartext HTTP/2 prior knowledge to forward proxies #1571

Closed

Description

@jlouvel

Problem

With transportMode=HTTP2 and a forward proxy configured, a plain http:// request opens a cleartext connection to the proxy and immediately sends the HTTP/2 connection preface (addHttp2Handlers, prior knowledge). Most HTTP proxies (Squid, corporate proxies, etc.) only speak HTTP/1.1 to clients, so the request fails.

Proposed fix

When a forward proxy is used for a cleartext request, either:

  • fall back to HTTP/1.1 (absolute-form request line) and log it at FINE level, or
  • fail fast with a clear error saying that HTTP/2 prior knowledge is not supported through a forward proxy.

Falling back seems more useful, and DYNAMIC mode already behaves that way. Add a test case in ProxyTestCase.

Activity

  1. added 6 commits that reference this issue on Oct 31, 2026
    4158ffb
    6e5bd8c
    a9cb53e
    ea238e8
    4d3139b
    80bf24c
  2. jlouvel commented on Nov 5, 2026

    @jlouvel
    CollaboratorAuthor

    Fixed by #1578: in HTTP2 transport mode, a cleartext request through a forward proxy falls back to HTTP/1.1 with an absolute-form request line, instead of sending the HTTP/2 prior-knowledge preface. ProxyTestCase covers it.

    🤖 Generated with Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions