# Tedee Bridge closes persistent HTTP connection before responding to callback POST

**URL:** <https://community.tedee.com/t/tedee-bridge-closes-persistent-http-connection-before-responding-to-callback-post/793>\
**Category:** Development\
**Created:** [October 12, 2026, 8:57pm UTC](https://community.tedee.com/t/tedee-bridge-closes-persistent-http-connection-before-responding-to-callback-post/793 "2026-10-12T20:57:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sanmibuh](https://yyz1.discourse-cdn.com/flex003/user_avatar/community.tedee.com/sanmibuh/32/274_2.png) [@sanmibuh](https://community.tedee.com/u/sanmibuh)\
**Post date:** [October 12, 2026, 8:57pm UTC](https://community.tedee.com/t/tedee-bridge-closes-persistent-http-connection-before-responding-to-callback-post/793/1 "2026-10-12T20:57:01Z")

</div>

The local Tedee Bridge API closes a persistent HTTP/1.1 connection without sending a response when a `POST /v1.0/callback` request follows a `GET /v1.0/callback` request on the same connection.

This prevents clients that reuse HTTP connections, including Java’s `HttpClient`, from registering a callback. The client receives an EOF instead of an HTTP response.

### Expected Behavior

The Bridge should return an HTTP response to the POST request on a valid persistent connection. With an invalid token, the expected response is `401 Unauthorized`.

Alternatively, if persistent connections are unsupported, the Bridge should explicitly send `Connection: close` in the response to the preceding request.

### Actual Behavior

The initial GET returns `401 Unauthorized` and leaves the HTTP connection open. The Bridge then closes that reused connection after receiving the POST request, without returning headers or a response body.

The same POST succeeds when sent through a newly established connection and returns `401 Unauthorized`, confirming that the endpoint, network path, and JSON request body are valid.

### Reproduction

Run the following command from a host that can reach the Bridge. Replace the IP address and callback URL as appropriate:

`curl -v \ -H 'api_token: invalid' \ ``http://10.0.1.24/v1.0/callback`` \ --next \ -X POST ``http://10.0.1.24/v1.0/callback`` \ -H 'Content-Type: application/json' \ -H 'api_token: invalid' \ --data '{"url":"``http://10.0.0.2:9001/tedee/events","method":"POST","headers":[{"headerName":"X-Tedee-Callback-Secret:`` test"}]}'`

Relevant curl output:  
`\* Reusing existing http: connection with host 10.0.1.24

> POST /v1.0/callback HTTP/1.1  
> …

- Connection died, retrying a fresh connect`

After curl opens a fresh connection, the same POST receives:  
`HTTP/1.1 401 Unauthorized`  
`{"error-description":"Invalid token"}`

### Client Error

Java’s `HttpClient` reports the closed reused connection as:  
`java.io.IOException: HTTP/1.1 header parser received no bytes`  
`Caused by: java.io.EOFException: EOF reached while reading`

### Request

Could you confirm whether persistent HTTP/1.1 connections are supported by the local Bridge API? If they are supported, please investigate why the Bridge closes the connection before responding to `POST /v1.0/callback` after `GET /v1.0/callback`.

---

<div class="post-metadata">

**Author:** ![Konrad](https://yyz1.discourse-cdn.com/flex003/user_avatar/community.tedee.com/konrad/32/6_2.png) [@Konrad](https://community.tedee.com/u/Konrad)\
**Post date:** [October 19, 2026, 12:34pm UTC](https://community.tedee.com/t/tedee-bridge-closes-persistent-http-connection-before-responding-to-callback-post/793/2 "2026-10-19T12:34:25Z")

</div>

Thank you for the report. We have reproduced the issue and confirmed it.

The local Bridge API does not support persistent HTTP/1.1 connections. It closes the connection after each response. The problem is that the response doesn’t announce this with a `Connection: close` header, so clients try to reuse the connection. We have a fix, and we’ll include it in the next Bridge firmware release.

Until then, please open a new connection for every request to the Bridge.
