Hello,
I am creating an app that will need to accept http2 over plain text (h2c). I want to support both http2
and http2-prior-knowledge
. I’ve created a small GO application to test this, however, when I try to connect with http-prior-knowledge
I get a broken pipe error.
❯ curl --http2-prior-knowledge http://h2c-test.fly.dev -v
* Trying 66.241.125.209:80...
* Connected to h2c-test.fly.dev (66.241.125.209) port 80 (#0)
* Using HTTP2, server supports multiplexing
* Connection state changed (HTTP/2 confirmed)
* Copying HTTP/2 data in stream buffer to connection buffer after upgrade: len=0
* Using Stream ID: 1 (easy handle 0x134811400)
> GET / HTTP/2
> Host: h2c-test.fly.dev
> user-agent: curl/7.79.1
> accept: */*
>
* Recv failure: Connection reset by peer
* Failed receiving HTTP2 data
* Send failure: Broken pipe
* Failed sending HTTP2 data
* Connection #0 to host h2c-test.fly.dev left intact
curl: (56) Recv failure: Connection reset by peer
I have set the app up according to this:
Here is my current configuration:
# fly.toml
app = 'h2c-test'
primary_region = 'mia'
[build]
builder = 'paketobuildpacks/builder:base'
buildpacks = ['gcr.io/paketo-buildpacks/go']
[env]
PORT = '8080'
[http_service]
internal_port = 8080
force_https = false
auto_stop_machines = true
auto_start_machines = true
min_machines_running = 0
processes = ['app']
[http_service.http_options]
h2_backend = true
Am I doing anything wrong here to prevent being able to accept http2 requests with prior knowledge?