HAProxy community

Incorrect scheme set while proxying to a http/2 cleartext (h2c) backend

#1

I am using HA-Proxy version 1.9.4 2019/02/06 for proxying HTTP/2 cleartext (h2c) traffic to a h2c backend. I am however seeing HA-Proxy set the :scheme https when proxying the request. When I hit the backend directly, the :scheme is set to http. I have verified this using wireshark (please see attached images).

Any suggestions on what I should change in my configuration so that I can set to make sure that the :scheme gets set to http while proxying the request?

I am using curl 7.54.0 to make requests:
$ curl --http2-prior-knowledge http://localhost:9090

My HA-Proxy config file:

global
   maxconn 4096
   daemon

defaults
   log   global
   option http-use-htx
   timeout connect 10s
   timeout client 30s
   timeout server 30s
   maxconn 3000

frontend waiter
    mode http
    bind *:9090 proto h2
    default_backend local_node

backend local_node
    mode http
    server localhost localhost:8080 proto h2

#2

Any suggestions on how to get h2c working to the backend in this scenario (using mode http)?

#3

Filed an issue on github: https://github.com/haproxy/haproxy/issues/77

1 Like