WebSocket: backend request left open when the client leaves before the upgrade completes
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- java
- Área
- backend, networking
Línea de trabajo
Start with the WebSocket branch of ReverseProxy.Proxy#sendRequest, which calls request.connect() without setting a reset handler, and compare it with ProxiedRequest#sendRequest, which resets the backend request from the client response's exception handler. Then read ReverseProxy.Proxy#sendResponse where the 101 failure branch prints 'Handle this case'. The two tests named in WebSocketTest in PR #156 are the reproducers; the work is done when both pass and the backend socket closes after the client leaves. PR #156 is already open, so check it before starting.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Version
5.2.1 (also current main)
Context
The client and backend sockets of a proxied WebSocket are only joined in ReverseProxy.Proxy#sendResponse once the
backend answers 101. Nothing watches the client connection before that, so a client that goes away during the
upgrade leaves the request to the backend open:
- Backend has not answered yet: the backend connection stays open for as long as the backend does not answer
(indefinitely for a backend that never answers). - Backend answers 101 after the client left:
proxiedRequest().toNetSocket()fails, the failure branch prints
Handle this caseand a stack trace toSystem.err, and the backend socket is never closed. - Client already gone when the origin is resolved (e.g. an
OriginRequestProviderdoing an async lookup): the
upgrade is still sent to the backend.
Proxied HTTP requests do not have this problem: ProxiedRequest#sendRequest resets the backend request from the
client response's exception handler. The WebSocket branch in ReverseProxy.Proxy#sendRequest calls
request.connect() directly and does not set it.
Steps to reproduce
- Proxy to a backend that reads the upgrade request and never answers.
- Send a WebSocket upgrade through the proxy, then close the client connection.
- The backend connection is never closed.
Do you have a reproducer?
Yes, two tests in WebSocketTest in the linked PR; both fail on main (the first by timing out, the second with the
upgrade reaching the backend).
- Lenguaje dominante
- Java
- Estrellas
- 68
- Forks
- 38
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de eclipse-vertx/vertx-http-proxy
-
enhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 68/100
-
Dificultad 3/5 1-2 días Aptitud para principiantes 62/100
-
Custom Hop-By-Hop HeadersQuizá libre de nuevo @Yash-294 la tomó hace 375 días y no hay ningún pull request abierto. Abiertoenhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
eclipse-vertx/vertx-http-proxy#139 · 3 comentarios ·
Todos los issues de eclipse-vertx/vertx-http-proxy
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
navikt/mock-oauth2-server#1129 ·
Los mantenedores suelen responder en 1 día
-
[Blockly] historic state medianAbiertobug main ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
openhab/openhab-webui#4600 ·
Los mantenedores suelen responder en 4 días
-
`DeepSeekChatModel` streaming returns no content when chunks have no `id`Posiblemente ocupada @lejuho la tomó hoy. Abiertostatus: waiting-for-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
spring-projects/spring-ai#7214 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
QuiltMC/update-quilt-meta#28 ·
-
awaiting triage Documentation P3
Dificultad 1/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día