http: empty Host header closes the connection with no response
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 75/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- c
- Área
- backend, networking
Línea de trabajo
Empieza en lib/monkey/mk_server/mk_http_parser.c, en el procesamiento de Host que se muestra en el issue, y luego sigue la ruta del error del parser que cierra la conexión. Comprueba cómo gestiona esa ruta el issue relacionado #12648 y encuentra las pruebas relevantes del servidor HTTP. El trabajo estará terminado cuando un Host: vacío reciba una respuesta 400 antes de que se cierre la conexión y los casos existentes sigan comportándose como se describe.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Bug Report
Describe the bug
A request with an empty Host: value is rejected by closing the connection with no HTTP response at all —
not a 400, nothing. The client sees a bare EOF.
To Reproduce
POST / HTTP/1.1
Host:
Content-Type: application/json
Content-Length: 7
{"a":1}
Result: connection closed immediately, zero response bytes. Reproducible every run.
Contrast: no Host header at all → 201; duplicate Host headers → 201.
Root cause
lib/monkey/mk_server/mk_http_parser.c, in the Host handling:
if (i == MK_HEADER_HOST) {
if (header->val.len == 0) {
return -MK_CLIENT_BAD_REQUEST;
}
That returns a parser error, and the error path closes the connection without writing a status line (the same
path as #12648). So an empty Host is treated as fatal-and-silent rather than as a 400.
Expected behavior
A 400 Bad Request response, then close. An empty Host is a client error, not a transport failure, and the
client currently cannot tell the difference.
Your Environment
- Fluent Bit 5.1.5 (
fluent/fluent-bit:latest) - Linux, aarch64, official container image
- Input:
httpplugin, default settings
Impact
Pre-auth. Clients that emit an empty Host: (some HTTP libraries do when the target has no hostname) get a
silent failure with no status code and nothing to log or retry on. Related to #12648, which is the same
silent-close path reached from a different trigger.
- Lenguaje dominante
- C
- Estrellas
- 8.2k
- Forks
- 2k
- Merge medio
- 3 d 20 h
- PR fusionados (30 d)
- 99
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una 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 fluent/fluent-bit
-
in_tail: files falsely detected as rotated on macOS with threaded inputs, causing duplicate recordsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
fluent/fluent-bit#12780 ·
Los mantenedores suelen responder en 1 día
-
status: waiting-for-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
fluent/fluent-bit#12683 · 2 comentarios · 6 reacciones ·
Los mantenedores suelen responder en 1 día
-
http: Transfer-Encoding chunked plus Content-Length hangs forever (CL branch shadows the chunked path)Posiblemente ocupada @sarankumar1325 la tomó hace 14 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
fluent/fluent-bit#12656 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
fluent/fluent-bit#12649 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 79/100
fluent/fluent-bit#12636 ·
Los mantenedores suelen responder en 1 día
Todos los issues de fluent/fluent-bit
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
micropython/micropython#19942 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 3 días
-
快速入门那里会不会对新手不太友好,提出优化方案Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 84/100
-
-disable-symbolserver is ignored on macOS/Linux: PDBs are still downloaded from msdl.microsoft.comAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100