Skip to content

HTTP/2 connection to YARP with HTTP/1.1 to backend fails #583

Closed
@devbeard

Description

@devbeard

Describe the bug

I have set up a sample application with routing from https://localhost:5001 to a docker container that echoes all received headers. The container is running on http://localhost:8080. It responds with a connection=keep-alive, causing f.ex. curl to complain as this is not valid in the http/2 context.

* http2 error: Invalid HTTP header field was received: frame type: 1, stream: 1, name: [connection], value: [keep-alive]
* HTTP/2 stream 1 was not closed cleanly: PROTOCOL_ERROR (err 1)

Question: Is this a supported scenario - i.e. going from a secured, HTTP/2 channel with a HTTP/1.1 backend? Is it the client (which has no knowledge of this) or proxy that is responsible of adhering to the protocol change?

To Reproduce

Run some image on a non-HTTPS binding. Example:
docker run -p 8080:8080 brndnmtthws/nginx-echo-headers

Run a simple YARP instance pointing all traffic to http://localhost:8080
dotnet run ReverseProxySample

From WSL or similar, do a curl
curl --insecure -v https://localhost:5001

Further technical details

  • Include the version of the packages you are using
    1.0.0-preview.7.*

  • The platform (Linux/macOS/Windows)
    Linux and Windows

Metadata

Metadata

Assignees

Labels

Type: BugSomething isn't working

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions