apache / apache/pekko-http

`ServerBinding` termination does not close HTTP/2 connections with h2c Upgrade connection setup

Open
#638 14 comments 0 reactions 0 assignees View on GitHub
bug enhancement
Dominant language
Scala
Stars
196
Forks
55
Avg merge
4d 52m
Merged PRs (30d)
74

Description

Calling the `ServerBinding` `terminate()` method appears to not close open HTTP/2 connections reused by a client for different requests, even after the `hardDeadline` timeout is exceeded. In fact, **new requests are still handled successfully** even after the termination future completes.

Steps to reproduce (in 1.1.0):
1. Use `enable-http2=on` in the Typesafe Config.
2. Create a binding with `Http().newServerAt(...).bind(...)`.
3. Make an HTTP request to this service with a client. I used [Unirest](https://kong.github.io/unirest-java/) for this.
4. Request binding termination and await for it.
5. Make more HTTP requests with the same connection. [Unirest](https://kong.github.io/unirest-java/) does that behind the scenes.
6. Verify that the service still responds, even though it was supposed to be terminated.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the issue with enable-http2=on, Http().newServerAt(...).bind(...), and a connection-reusing Unirest client. Then inspect the ServerBinding terminate() path and h2c Upgrade connection handling. Done means termination closes reused HTTP/2 connections after the hardDeadline and later requests are no longer handled.

Written by the indexing model from the issue text.

Assessment

Tech stack
scala
Domain
backend, networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.