Header "connection: close" disconnects the client before Response Stream is started
#2 276 ouverte le 10 mars 2025
Métriques du dépôt
- Stars
- (10 462 stars)
- Métriques de merge PR
- (Merge moyen 2j 2h) (7 PRs mergées en 30 j)
Description
Describe the bug
In our project we use Drogon for HTTP response streaming.
However, when client includes connection header that is not keep-alive, response stream is immediaitely closed.
It is common practice to use connection: close to indicate that connection should be closed after processing is finished*, meaning - after HTTP response stream is done.
In our setup, we needed to patch drogon like this: https://github.com/openvinotoolkit/model_server/pull/3113/commits/8ca2918c04ae9fab77ad157dcd23673971d84420
To Reproduce Steps to reproduce the behavior:
- Start drogon with streaming response endpoint defined
- Request with any client including header
connection: close - Request is immediately rejected
Expected behavior Connection is closed after response streaming is finished.
Desktop (please complete the following information):
- OS: ubuntu, redhat, windows
- Client: any
More context
We are using Continue VSCode plugin as a client for code completions: https://github.com/continuedev/continue
We use drogon to serve http streaming (code completions), however, this plugin (client) sends connection: close header.